Java 类android.support.v4.app.FragmentManager.OnBackStackChangedListener 实例源码

项目:FMTech    文件:PreviewController.java   
public static void setupOnBackStackChangedListener(NavigationManager paramNavigationManager)
{
  FragmentManager.OnBackStackChangedListener local1 = new FragmentManager.OnBackStackChangedListener()
  {
    public final void onBackStackChanged()
    {
      PreviewPlayer localPreviewPlayer1 = PreviewController.mPlayer;
      Utils.ensureOnMainThread();
      localPreviewPlayer1.mQueue.clear();
      PreviewPlayer localPreviewPlayer2 = PreviewController.mPlayer;
      switch (localPreviewPlayer2.mPlayer.mCurrentState)
      {
      }
      for (;;)
      {
        PreviewController.mPlayer.reset();
        this.val$navigationManager.removeOnBackStackChangedListener(this);
        return;
        localPreviewPlayer2.mPlayer.stop();
      }
    }
  };
  paramNavigationManager.removeOnBackStackChangedListener(local1);
  paramNavigationManager.addOnBackStackChangedListener(local1);
}
项目:android-whogoesfirst    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getSupportFragmentManager().addOnBackStackChangedListener(new OnBackStackChangedListener() {
        @Override
        public void onBackStackChanged() {
            supportInvalidateOptionsMenu();
        }
    });

    if (savedInstanceState == null) {
        mPlayerCountFragment = new PlayerCountFragment();

        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        ft.add(android.R.id.content, mPlayerCountFragment, PlayerCountFragment.TAG);
        ft.commit();
    }
    else {
        mPlayerCountFragment = Ui.findFragment(this, PlayerCountFragment.TAG);
        mWhoGoesFragment = Ui.findFragment(this, WhoGoesFragment.TAG);
    }
}
项目:letv    文件:FragmentManagerImpl.java   
void reportBackStackChanged() {
    if (this.mBackStackChangeListeners != null) {
        for (int i = 0; i < this.mBackStackChangeListeners.size(); i++) {
            ((OnBackStackChangedListener) this.mBackStackChangeListeners.get(i)).onBackStackChanged();
        }
    }
}
项目:boohee_v5.6    文件:FragmentManagerImpl.java   
void reportBackStackChanged() {
    if (this.mBackStackChangeListeners != null) {
        for (int i = 0; i < this.mBackStackChangeListeners.size(); i++) {
            ((OnBackStackChangedListener) this.mBackStackChangeListeners.get(i)).onBackStackChanged();
        }
    }
}
项目:extend-enhance-base    文件:BaseActivity.java   
/**
 * * It called by {@link #onCreate(Bundle)}) from {@link BaseActivity} automatically. <br/>
 * It used to add system default back stack.<br/>
 */
public void setDefaultBackStackListener() {
    getSupportFragmentManager().addOnBackStackChangedListener(new OnBackStackChangedListener() {
        @Override
        public void onBackStackChanged() {
            BackStackSyncStatus();
        }
    });
}
项目:TedMemo    文件:FragmentExchangeController.java   
public static void addFragment(FragmentManager supportFragmentManager, Fragment baseDialogFragment, int content, String tag) {

        FragmentTransaction transaction = supportFragmentManager.beginTransaction();
        transaction.setCustomAnimations(R.anim.anim_fragment_in, R.anim.anim_fragment_out, R.anim.anim_fragment_close_in, R.anim.anim_fragment_close_out);
        Fragment fragment = supportFragmentManager.findFragmentById(content);
        if (fragment != null) {
            if (fragment instanceof OnBackStackChangedListener) {
                supportFragmentManager.addOnBackStackChangedListener((OnBackStackChangedListener) fragment);
            }
            transaction.hide(fragment);
        }
        transaction.add(content, baseDialogFragment, tag);
        transaction.addToBackStack(tag);
        transaction.commitAllowingStateLoss();
    }
项目:letv    文件:FragmentManagerImpl.java   
public void addOnBackStackChangedListener(OnBackStackChangedListener listener) {
    if (this.mBackStackChangeListeners == null) {
        this.mBackStackChangeListeners = new ArrayList();
    }
    this.mBackStackChangeListeners.add(listener);
}
项目:letv    文件:FragmentManagerImpl.java   
public void removeOnBackStackChangedListener(OnBackStackChangedListener listener) {
    if (this.mBackStackChangeListeners != null) {
        this.mBackStackChangeListeners.remove(listener);
    }
}
项目:boohee_v5.6    文件:FragmentManagerImpl.java   
public void addOnBackStackChangedListener(OnBackStackChangedListener listener) {
    if (this.mBackStackChangeListeners == null) {
        this.mBackStackChangeListeners = new ArrayList();
    }
    this.mBackStackChangeListeners.add(listener);
}
项目:boohee_v5.6    文件:FragmentManagerImpl.java   
public void removeOnBackStackChangedListener(OnBackStackChangedListener listener) {
    if (this.mBackStackChangeListeners != null) {
        this.mBackStackChangeListeners.remove(listener);
    }
}
项目:ircradio    文件:ActMain.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.act_main);

    // enable ActionBar app icon to behave as action to toggle nav drawer
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setHomeButtonEnabled(true);

    // ActionBarDrawerToggle ties together the the proper interactions
    // between the sliding drawer and the action bar app icon
    mDrawerToggle = new ActionBarDrawerToggle(
            this, /* host Activity */
            mDrawerLayout, /* DrawerLayout object */
            R.string.drawer_open, /*
                                     * "open drawer" description for
                                     * accessibility
                                     */
            R.string.drawer_close /*
                                     * "close drawer" description for
                                     * accessibility
                                     */
    ) {
        public void onDrawerClosed(View view) {
            refreshTitle(false);
            invalidateOptionsMenu(); // creates call to
            // onPrepareOptionsMenu()
            if (ActMain.this.getSupportFragmentManager().getBackStackEntryCount() > 1) {
                mDrawerToggle.setDrawerIndicatorEnabled(false);
            }
        }

        public void onDrawerOpened(View drawerView) {
            refreshTitle(true);
            invalidateOptionsMenu(); // creates call to
            // onPrepareOptionsMenu()
            mDrawerToggle.setDrawerIndicatorEnabled(true);
        }
    };
    mDrawerLayout.setDrawerListener(mDrawerToggle);

    if (savedInstanceState == null) {
        addTopFragmentToStack();
    }

    getSupportFragmentManager().addOnBackStackChangedListener(new OnBackStackChangedListener() {

        @Override
        public void onBackStackChanged() {
            int count = ActMain.this.getSupportFragmentManager().getBackStackEntryCount();
            if (count > 1) {
                mDrawerToggle.setDrawerIndicatorEnabled(false);
            } else {
                mDrawerToggle.setDrawerIndicatorEnabled(true);
            }
        }
    });

}
项目:FMTech    文件:NavigationManager.java   
public void addOnBackStackChangedListener(FragmentManager.OnBackStackChangedListener paramOnBackStackChangedListener)
{
  this.mFragmentManager.addOnBackStackChangedListener(paramOnBackStackChangedListener);
}
项目:FMTech    文件:NavigationManager.java   
public final void removeOnBackStackChangedListener(FragmentManager.OnBackStackChangedListener paramOnBackStackChangedListener)
{
  this.mFragmentManager.removeOnBackStackChangedListener(paramOnBackStackChangedListener);
}
项目:FMTech    文件:ActionBarHelper.java   
public ActionBarHelper(NavigationManager paramNavigationManager, ActionBarController paramActionBarController, ActionBarActivity paramActionBarActivity)
{
  this.mActionBar = paramActionBarActivity.getDelegate().getSupportActionBar();
  this.mToolbar = ((FinskySearchToolbar)paramActionBarActivity.findViewById(2131755196));
  this.mActivity = paramActionBarActivity;
  this.mNavigationManager = paramNavigationManager;
  this.mActionBarController = paramActionBarController;
  this.mActionBarStateStack = new Stack();
  this.mActionBarStateStack.push(new ActionBarState(0, null));
  this.mCurrentBackendId = 0;
  if (this.mToolbar != null)
  {
    this.mToolbar.setCurrentBackendId(this.mCurrentBackendId);
    this.mToolbar.setNavigationManager(this.mNavigationManager);
    this.mToolbar.setActionBarController(this.mActionBarController);
    this.mToolbar.setVisibility(4);
  }
  if (this.mToolbar != null) {
    if ((!DotNotificationUtils.shouldShowAccountCompletionDotNotification()) || (((Integer)FinskyPreferences.accountCompletionMainMenuDotTapCount.get(FinskyApp.get().getCurrentAccountName()).get()).intValue() != 0)) {
      break label306;
    }
  }
  label306:
  for (int i = 1;; i = 0)
  {
    if (i != 0)
    {
      View localView = this.mToolbar.getSearchView().findViewById(2131755724);
      if (localView != null) {
        localView.setVisibility(0);
      }
      this.mMainMenuUiElementNode = new GenericUiElementNode(5301, null, null, new GenericUiElementNode(5300, null, null, this.mNavigationManager.getActivePage()));
      FinskyApp.get().getEventLogger().logPathImpression$7d139cbf(299, this.mMainMenuUiElementNode);
    }
    if (this.mActionBar != null) {
      this.mActionBar.setBackgroundDrawable(getBackgroundColorDrawable(CorpusResourceUtils.getPrimaryColor(this.mActivity, 0)));
    }
    this.mTransparentBackgroundDrawable = new ColorDrawable(0);
    paramNavigationManager.addOnBackStackChangedListener(new FragmentManager.OnBackStackChangedListener()
    {
      public final void onBackStackChanged()
      {
        if (ActionBarHelper.sSawFirstBackstackChange) {
          ActionBarHelper.this.clearSearch();
        }
        for (;;)
        {
          ActionBarHelper.this.syncState();
          return;
          ActionBarHelper.access$002$138603();
        }
      }
    });
    return;
  }
}
项目:ImproveMyCity-Mobile    文件:Fragment_Map.java   
/**
 *            OnCreateView 
 * 
 */
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    // ----- Inflate the view ---------
    if (vframelayout_main != null) {
        //ViewGroup parent = (ViewGroup) vframelayout_main.getParent();
        container.removeView(vframelayout_main);
    } else {        
        vframelayout_main = inflater.inflate(R.layout.framelayout_map, container, false);
    }

    ctx = vframelayout_main.getContext();

    //------- Add fragment_map ----
    if (fmap_main==null){
        fmap_main = SupportMapFragment.newInstance();
        FragmentTransaction fragmentTransaction = getChildFragmentManager().beginTransaction();
        fragmentTransaction.add(R.id.flmain, fmap_main);
        fragmentTransaction.commit();
    }

    getFragmentManager().addOnBackStackChangedListener(new OnBackStackChangedListener() {    
        public void onBackStackChanged() {
            if (fmap_main == null && !Fragment_Issue_Details.isVisible && FActivity_TabHost.IndexGroup==0){
                onResume();
            } 
        }
    });

    //-----------------------------
    pbgeneral = (ProgressBar) vframelayout_main.findViewById(R.id.pbgeneral);
    pbgeneral.bringToFront();

    //---- Bind Location Service --------------
    IntLocServ = new Intent(ctx, Service_Location.class);

    if (!isLocServBound && FActivity_TabHost.IndexGroup == 0)
        ctx.bindService(IntLocServ, mLocConnection, Context.BIND_AUTO_CREATE);

    FActivity_TabHost.IndexGroup = 0;


    //-----Start Data Service ------------
    IntDataServ = new Intent(ctx, Service_Data.class);
    ctx.startService(IntDataServ);


    return vframelayout_main;
}
项目:FMTech    文件:FakeNavigationManager.java   
public final void addOnBackStackChangedListener(FragmentManager.OnBackStackChangedListener paramOnBackStackChangedListener) {}