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