Example #1
0
 @Override
 public void onTabChanged(String tabId) {
   if (mAttached) {
     FragmentTransaction ft = doTabChanged(tabId, null);
     if (ft != null) {
       ft.commit();
     }
   }
   if (mOnTabChangeListener != null) {
     mOnTabChangeListener.onTabChanged(tabId);
   }
 }
 @Override
 public void onTabChanged(String tabId) {
   // 先知道,然后再改变
   if (mOnTabChangeListener != null) {
     mOnTabChangeListener.onTabChanged(tabId);
   }
   //		if (mAttached) {
   //			FragmentTransaction ft = doTabChanged(tabId, null);
   //			if (ft != null) {
   //				ft.commit();
   //			}
   //		}
   //		if (mOnTabChangeListener != null) {
   //			mOnTabChangeListener.onTabChanged(tabId);
   //		}
 }