예제 #1
0
 /**
  * 显示一个Fragment
  *
  * @param fragment
  */
 public void showFragment(Fragment fragment) {
   if (fragment.isHidden()) {
     FragmentTransaction fragmentTransaction = getFragmentTransaction();
     fragmentTransaction.show(fragment);
     fragmentTransaction.commit();
   }
 }
예제 #2
0
 /**
  * 隐藏一个Fragment
  *
  * @param fragment
  */
 public void hideFragment(Fragment fragment) {
   if (!fragment.isHidden()) {
     FragmentTransaction fragmentTransaction = getFragmentTransaction();
     fragmentTransaction.hide(fragment);
     fragmentTransaction.commit();
   }
 }
예제 #3
0
 public boolean isHidden() {
   return zzadh.isHidden();
 }