安卓修改顶部状态栏背景色和字体颜色
在AndroidManifest文件:<application...android:theme="@style/xxxx">点进theme:<style name="xxxx" parent="xxxxxxxx">...<item name="colorPrimaryVariant">@color/white</item>//这个就是状态栏的背景颜色
·
在AndroidManifest文件:
<application
...
android:theme="@style/xxxx">
点进theme:
<style name="xxxx" parent="xxxxxxxx">
...
<item name="android:statusBarColor">@color/white</item> //这个就是状态栏的背景颜色
...
</style>
修改字体颜色(黑色):在Activity中:
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
即可
更多推荐
已为社区贡献3条内容
所有评论(0)