Code example for FragmentActivity

Methods: onAttachFragment

0
		} 
	} 
 
	@Override 
	public void onAttachFragment(final Fragment fragment) {
		super.onAttachFragment(fragment);
		mAttachedFragment = fragment;
		if (mActionBarCompat instanceof ActionBarCompatBase) {
			((ActionBarCompatBase) mActionBarCompat).createActionBarMenu();
		} 
	} 
 
	@Override 
	public void onBackPressed() { 
		if (mActionBarCompat instanceof ActionBarCompatBase) {
			if (((ActionBarCompatBase) mActionBarCompat).isActionModeShowing() && mActionModeCompat != null) {
				mActionModeCompat.finish();
			} 
		} 
		super.onBackPressed(); 
	}