Code example for FragmentManager

Methods: beginTransactionpopBackStack

0
	} 
     
    @Override 
	public void onAppSelectedListener(AppEntry app) {
		FragmentManager fm = getFragmentManager();
		FragmentTransaction ft = fm.beginTransaction();
		Fragment pref = getFragmentManager().findFragmentByTag("details");
		if (pref == null){
			ft.replace(android.R.id.content, new AppDetailFragment(app), "details");
			ft.addToBackStack(null);
			ft.commit();		
		}else{ 
			ft.remove(getFragmentManager().findFragmentByTag("details"));
			ft.commit();
			fm.popBackStack();	
		} 
	} 
     
    @Override 
	public void onWipedListener() { 
    	Fragment pref = getFragmentManager().findFragmentByTag("details");