Code example for FragmentManager

Methods: getBackStackEntryCount

0
   */ 
  public void onBackStackChanged() { 
    LogFacade.entry(LOG_TAG, "onBackStackChanged");
     
    FragmentManager fragmentManager = mainActivity.getFragmentManager();
    int backStackCount = fragmentManager.getBackStackEntryCount();
    LogFacade.debug(LOG_TAG,  "back stack count:" + backStackCount);
     
    ActionBar actionBar = mainActivity.getActionBar();
     
    if (backStackCount == 0) {
      // restore tabs 
      ignoreMe = true;
      actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
      mainActivity.clearCurrentStation();
    } else { 
      // hide tabs 
      actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    } 
     
    LogFacade.exit(LOG_TAG, "onBackStackChanged");