Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 navigationFragment.pushFragment 底部 TabBarFragment 消失(被新fragment 盖住) #11

Closed
currer opened this issue Apr 19, 2018 · 2 comments

Comments

@currer
Copy link

currer commented Apr 19, 2018

好像,使用TabBarFragment后,tab单页中的 navigationFragment 跳转(使用pushFragment )方法,底部导航栏会消失,使用 replace 是不消失的。这是BUG吗?如果不是,跳转后的fragment如何弹出底部TabBarFragment呢?
不过可以通过requireFragmentManager().add(...)的方式正常添加,不会遮挡TabBarFragment

@listenzz
Copy link
Owner

listenzz commented Apr 19, 2018

这是默认行为

如果不希望这样,在 navigationFragment 的 rootFragment 重写以下方法,返回 false

@Override
protected boolean hidesBottomBarWhenPushed() {
        return false;
 }

正如 demo 中 TestStatusBarFragment 这个类所做的那样

@currer
Copy link
Author

currer commented Apr 19, 2018

感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants