Code example for FragmentActivity

Methods: getActionBar, getIntent, getSupportFragmentManager, onCreate

0
	 * @see android.app.Activity#onCreate(android.os.Bundle)  
	 */ 
	@TargetApi(14) 
	@Override 
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
//		setContentView(R.layout.remote_activity); 
 
		// used in Honeycomb and up 
		if (Build.VERSION.SDK_INT >= ANDROID_V11) {
			ActionBar ac = this.getActionBar();
			if (ac != null) {
				ac.setDisplayHomeAsUpEnabled(true);
				 
				if (Build.VERSION.SDK_INT >= ANDROID_V14) {
					ac.setHomeButtonEnabled(true);
				} 
			} 
		} 
 
		if (savedInstanceState == null) {
            // During initial setup, plug in the details fragment. 
            RemoteFragment details = new RemoteFragment();
            details.setArguments(getIntent().getExtras());
            getSupportFragmentManager().beginTransaction().add(android.R.id.content, details).commit();
        } 
		 
		mSettings.readSettings(this);
	}