我阅读了一些关于 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/