我想实现 Material Design 指南中描述的状态栏,其中颜色应比工具栏深 20%。 我设置了以下样式:
样式.xml
<item name="android:windowTranslucentStatus">true</item>
Style.xml (v21)
<item name="android:windowTranslucentStatus">true</item>
但我得到的布局与预期完全不同。
模拟器 4.4
模拟器 5.0.1
索尼 Z3 5.0.1
是否有适当的技术使状态栏 20% 透明(甚至通过代码),将工具栏和抽屉发送到状态栏的背面并避免在工具栏上使用 FitSystemWindows 拉伸(stretch)满屏都是?
最佳答案
我想这就是您要找的: https://github.com/jgilfelt/SystemBarTint
请注意,它仅适用于 Android 4.4 (KitKat),无法在 4.4 之前的 Android 版本上为系统栏着色。
关于状态栏的 Android AppCompat Material 设计色调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29518938/