【问题标题】:Android status bar tints from kitkat to lollipop从 kitkat 到棒棒糖的 Android 状态栏颜色
【发布时间】:2015-05-26 21:28:53
【问题描述】:

我正在尝试为我的应用实现漂亮的状态栏,并在 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>

但是在棒棒糖上它没有很好的渐变效果。它只是颜色较深。

我怎样才能让棒棒糖状态栏看起来像奇巧呢?

【问题讨论】:

  • 为了我的两便士。我其实更喜欢没有渐变的。
  • a) phuzi 说的。 b) 在 kitkat 上,半透明状态栏的实现与棒棒糖不同,我们也不能从代码中改变。
  • 好的,所以这不太可能。我很惊讶你们都喜欢非渐变版本。我觉得挺好看的。不过各有千秋。

标签: android android-5.0-lollipop statusbar android-4.4-kitkat android-appcompat


【解决方案1】:

您可以使用Jeff Gilfelt开发的SystemBarTint

【讨论】:

    猜你喜欢
    • 2015-11-24
    • 2015-03-06
    • 1970-01-01
    • 2017-10-16
    • 2016-04-03
    • 2016-05-02
    • 1970-01-01
    • 2015-08-14
    相关资源
    最近更新 更多