android - 我什么时候应该使用 windowDrawsSystemBarBackgrounds 属性?

标签 android

我阅读了一些关于 android fitsSystemWindows 属性和一些小部件(即抽屉导航)中的自定义行为的文章,没有问题。但是从文档中我无法真正理解 windowTranslucentStatus 和 windowDrawsSystemBarBackgrounds 之间的区别。有人可以解释一下何时应该/不应该使用每个属性吗?

我想我需要使用 windowTranslucentStatus + fitsSystemWindows 和 windowTranslucentNavigation + clipToPadding,但 windowDrawsSystemBarBackgrounds 有什么用?

最佳答案

android:windowTranslucentStatus设置为true时窗口请求透明状态栏

WindowTranslucentStatus documentation

android:windowDrawsSystemBarBackgrounds 设置为 true 结果,在 API 级别 21 及更高级别上,所有内容都可以在状态栏下绘制。

关于android - 我什么时候应该使用 windowDrawsSystemBarBackgrounds 属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45260288/

相关文章:

java - 如何在 Android 上查找具有特定扩展名的所有文件?

Android 向下滑动到向上和向上向下滑动

android - GLSurfaceView.RENDERMODE_CONTINUOUSLY 导致闪烁

Android 支持 Cardview contentPadding 不工作

android - 在 Nexus 7 android 的 android webview 中播放内部存储中的 .SWF 文件

android - 使用 Kotlin 数据类的 Json 解析器正确返回 json 数据,但是为什么解析器(MockK)的单元测试会失败?

java - Android ImageView 按路径显示图片

android - 在 android 中获取和解析 CSV 文件

android - 数据绑定(bind) - onActivityResult 之后 XML 未更新

android - OpenCV 2.4.5 android, FeatureDetector, DescriptorExtractor