Code example for FragmentActivity

0
 * side-by-side with a list of items in a {@link FileListActivity}. 
 * <p> 
 * This activity is mostly just a 'shell' activity containing nothing more than a 
 * {@link FileDetailFragment}. 
 */ 
public class FileDetailActivity extends FragmentActivity { 
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_file_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.