问题
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