从奇巧Android的状态栏色调,以棒棒糖 [英] Android status bar tints from kitkat to lollipop

查看:149
本文介绍了从奇巧Android的状态栏色调,以棒棒糖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现我的应用程序的不错状态栏,并已成功实现了这一对奇巧。

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

这是我使用的XML

<?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?

推荐答案

您可以使用 SystemBarTint 库开发通过杰夫Gilfelt

You can use SystemBarTint library developed by Jeff Gilfelt

这篇关于从奇巧Android的状态栏色调,以棒棒糖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆