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

Android10 状态栏会出现灰色遮罩,导航栏不会,看起来和历史issue应该是一个问题 #42

Closed
yyj001 opened this issue Aug 30, 2021 · 8 comments

Comments

@yyj001
Copy link

yyj001 commented Aug 30, 2021

UltimateBarX.with(this)
.transparent()
.light(true)
.applyStatusBar()

download

@Zackratos
Copy link
Owner

什么手机,用的哪个版本

@yyj001
Copy link
Author

yyj001 commented Sep 1, 2021

一加7 pro, 刚刚换了0.7.1版本,试了一下还是有遮罩

@yyj001
Copy link
Author

yyj001 commented Sep 1, 2021

UltimateBarX.statusBar(this) .transparent() .color(Color.TRANSPARENT) .colorRes(Color.TRANSPARENT) .light(true) .apply()

@Zackratos
Copy link
Owner

这个跟 issues5 应该不是同一个问题, issues5 说的是导航栏有遮罩,而你的是状态栏,我感觉应该是你用了其他的状态栏的库的方法或者是代码里加了

window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)

上面的代码在 Android 5.0 以上会导致状态栏有遮罩

@Zackratos
Copy link
Owner

issues5 的遮罩是 Android 10 以上才有的,你也可以换个低版本的手机看一下是不是还有遮罩,如果还有,就说明不是同一个问题

@yyj001
Copy link
Author

yyj001 commented Sep 2, 2021

Android 8的手机上测没有遮罩😂,我可以再研究一下

@yyj001
Copy link
Author

yyj001 commented Sep 4, 2021

问题是由于在style添加了 <item name="android:windowTranslucentStatus">true</item> 引起

@yyj001 yyj001 closed this as completed Sep 4, 2021
@Zackratos
Copy link
Owner

问题是由于在style添加了 <item name="android:windowTranslucentStatus">true</item> 引起

不应该啊,我会重新给他设为 false,我再看一样

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