简体   繁体   English

较低版本Android的状态栏和导航栏颜色不起作用

[英]Status Bar and Navigation Bar Color for Lower Version Android Not Working

I trying to implement Status Bar Color and Navigation Bar Color in My app, as it is given here 我试图在我的应用中实现状态栏颜色和导航栏颜色,如此处所示

App Compact 21 App Compact 21

and here Maintaining Copatibility 在这里保持兼容性

 <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
        <item name="colorPrimary">@color/status_bar</item>
        <item name="colorPrimaryDark">@color/status_bar</item>
        <item name="colorAccent">@color/status_bar</item>
    </style>

However the color of status bar is still black. 但是状态栏的颜色仍为黑色。 Can any one tell me why status bar color is not changing. 谁能告诉我为什么状态栏颜色没有改变。 Thanks in advance 提前致谢

I don't think the status bar color has been implemented in AppCompat yet. 我认为状态栏颜色尚未在AppCompat中实现。 I faced the exact problem and after days of online research i came to this conclusion and reversed back to SystemBarTint lib ( https://github.com/jgilfelt/SystemBarTint ) for changing the status bar color. 我遇到了确切的问题,经过几天的在线研究,我得出了这个结论,并转回到SystemBarTint lib( https://github.com/jgilfelt/SystemBarTint )来更改状态栏的颜色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM