Blankj / Blankj/AndroidUtilCode
Android10及以上版本,页面会被沉浸式状态栏遮挡(附上解决方法)
オープン
bug
- 主要言語
- Java
- スター
- 33.6k
- フォーク
- 10.6k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## 描述 Bug
Android10及以上版本,页面会被沉浸式状态栏遮挡
## 截图

图片链接: https://img2022.cnblogs.com/blog/1210268/202208/1210268-20220823163646914-1711712615.png
## 解决方法
```java
BarUtils.setStatusBarColor(CustomWebViewActivity.this, color, true);
//加上下面这两行
ViewGroup contentParent = CustomWebViewActivity.this.findViewById(android.R.id.content);
contentParent.getChildAt(0).setFitsSystemWindows(true);
```
或者在布局xml的根布局加上下面属性:
```
android:fitsSystemWindows="true"
```
希望作者可以抽空调整下,感谢
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。