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

状态栏设置颜色后,如何竖屏显示状态栏,横屏时如何隐藏状态栏。 #276

Open
xing609 opened this issue Sep 29, 2019 · 0 comments

Comments

@xing609
Copy link

xing609 commented Sep 29, 2019

状态栏设置颜色后,如何竖屏显示状态栏,横屏时如何隐藏状态栏。
现有个问题是:状态栏设置颜色:setStatusBarColor(ContextCompat.getColor(context,R.color.c2A2D4F));
监听横竖屏事件,横屏隐藏状态栏: getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
这时状态栏文字不显示了,但会有空白的颜色间距。状态栏没有去掉。竖屏是没有问题的。

目前我用这个方法:StatusBarUtil.setColorNoTranslucent(this,ContextCompat.getColor(context,R.color.c2A2D4F));可以达到效果,但在界面右滑返回时会顶部状态栏会出现白色闪一下,体验不好,没有解决根本问题。
建议:隐藏状态栏方法加上方法StatusBarUtil.setColorNoTranslucentForSwipeBack(...); 解决这个问题。

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

1 participant