本文整理汇总了Java中android.support.v4.app.FragmentManager.addOnBackStackChangedListener方法的典型用法代码示例。如果您正苦于以下问题:Java FragmentManager.addOnBackStackChangedListener方法的具体用法?Java FragmentManager.addOnBackStackChangedListener怎么用?Java FragmentManager.addOnBackStackChangedListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.app.FragmentManager
的用法示例。
在下文中一共展示了FragmentManager.addOnBackStackChangedListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BrowsingActivityNavigationControllerSinglePane
import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
public BrowsingActivityNavigationControllerSinglePane(int oldPanNumbers, FragmentManager fragmentManager, boolean fromRotation, BrowsingActivity browsingActivity, BottomNavigationView bottomNavigationView, BrowsingActivityControllerListener listener) {
super(oldPanNumbers, fragmentManager, fromRotation, browsingActivity, bottomNavigationView, listener);
paneNumber = 1;
backStackChangedListener = () -> {
if (fragmentManager.getBackStackEntryCount() == 0) {
bottomNavigationView.setVisibility(View.VISIBLE);
listener.setUpNavigation(false);
} else {
bottomNavigationView.setVisibility(View.GONE);
listener.setUpNavigation(true);
}
};
fragmentManager.addOnBackStackChangedListener(backStackChangedListener);
}
开发者ID:fekracomputers,项目名称:IslamicLibraryAndroid,代码行数:15,代码来源:BrowsingActivityNavigationControllerSinglePane.java
示例2: BackStackFrogmentManager
import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
public BackStackFrogmentManager(FragmentManager fragmentManager, BackStackChangeListener backStackChangeListener) {
this.fragmentManager = fragmentManager;
this.backStackChangeListener = backStackChangeListener;
this.lastBackStackEntryCount = fragmentManager.getBackStackEntryCount();
fragmentManager.addOnBackStackChangedListener(this);
}