Back to project page EmPubLite.
The source code is released under:
MIT License
If you think the Android project EmPubLite listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.commonsware.empublite; /*from w w w . j a v a 2 s .c om*/ import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.Menu; public class FaceBookActivity extends FragmentActivity { private MainFragment mainFragment; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState == null) { // Add the fragment on initial activity setup mainFragment = new MainFragment(); getSupportFragmentManager() .beginTransaction() .add(android.R.id.content, mainFragment) .commit(); } else { // Or set the fragment from restored state info mainFragment = (MainFragment) getSupportFragmentManager() .findFragmentById(android.R.id.content); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.face_book, menu); return true; } }