Code example for FragmentManager

Methods: beginTransaction, findFragmentById

0
		super.onCreate(savedInstanceState);
 
		FragmentManager fm = getSupportFragmentManager();
 
		// Create the list fragment and add it as our sole content. 
		if (fm.findFragmentById(android.R.id.content) == null) {
			PluginFragment list = new PluginFragment();
			fm.beginTransaction().replace(android.R.id.content, list).commit();
		} 
	} 
 
}