Code example for FragmentActivity

0
 * in a {@link PersonListActivity}. 
 * <p> 
 * This activity is mostly just a 'shell' activity containing nothing 
 * more than a {@link PersonDetailFragment}. 
 */ 
public class PersonDetailActivity extends FragmentActivity { 
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_person_detail); 
 
        // Show the Up button in the action bar. 
        getActionBar().setDisplayHomeAsUpEnabled(true); 
 
        // savedInstanceState is non-null when there is fragment state 
        // saved from previous configurations of this activity 
        // (e.g. when rotating the screen from portrait to landscape). 
        // In this case, the fragment will automatically be re-added 
        // to its container so we don't need to manually add it. 
Connect your IDE to all the code out there  Get Codota for Java