Code example for FragmentActivity

Methods: getActionBar, getFragmentManager, onCreate

0
	private static final String LOG_TAG = PreferenceActivity.class
			.getSimpleName();
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
 
		// Show the Up button in the action bar. 
		getActionBar().setDisplayHomeAsUpEnabled(true); 
 
		// Display the fragment as the main content. 
		getFragmentManager().beginTransaction() 
				.replace(android.R.id.content, new FsPrefsFragment()).commit();
 
		if (LogHelper.isLoggable(LOG_TAG)) {
			Log.d(LOG_TAG, "Preference Activity Started");
		} 
 
	} 
 
	@Override