Android status bar tints from kitkat to lollipop

偶尔善良 提交于 2019-12-20 05:34:08

问题


I'm trying to implement the nice status bar for my app and have successfully achieved this on kitkat.

This is the xml I'm using

<?xml version="1.0" encoding="utf-8" ?>
<resources>
    <style name="AppTheme" parent="AppTheme.Base"/>

    <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="android:windowBackground">@color/colorPrimary</item>
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowTranslucentNavigation">false</item>       
    </style>
</resources>

However on lollipop it doesn't have the nice gradient effect. It's just a darker colour.

How can I make the lollipop status bar look like the kitkat one?


回答1:


You can use SystemBarTint library developed by Jeff Gilfelt



来源:https://stackoverflow.com/questions/30469276/android-status-bar-tints-from-kitkat-to-lollipop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!