Code example for FragmentTransaction

Methods: hide

0
 
        @Override 
        public void onTabUnselected(Tab tab, FragmentTransaction ft) {
            if (mFragment != null) {
                // ft.detach(mFragment); 
                ft.hide(mFragment);
            } 
        } 
 
        @Override 
        public void onTabReselected(Tab tab, FragmentTransaction ft) {
            if (mFragment != null) {
                ft.attach(mFragment);
            } 
        } 
    } 
}