如何让我的导航栏始终变为红色?

时间:2015-05-29 22:31:27

标签: android android-5.0-lollipop material-design

我的导航栏在我的values-21 / styles.xml中变红了,但有时它会变回黑色,就像我打开键盘或登录时一样(在创建时从活动选择器创建的默认值)一个新的Activity)试图通过显示ProgressBar来登录。 这是我的styles.xml代码:

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <!-- Main theme colors -->
            <!--   your app branding color for the app bar -->
            <item name="colorPrimary">#F44336</item>
            <!--   darker variant for the status bar and contextual app bars -->
            <item name="colorPrimaryDark">#B71C1C</item>
            <!--   theme UI controls like checkboxes and text fields -->
            <item name="colorAccent">@color/accent_red</item>
            <item name="android:navigationBarColor">#F44336</item>
    </style>

    <style name="DialogTheme" parent="Theme.AppCompat.Light.Dialog">
            <!-- Main theme colors -->
            <!--   your app branding color for the app bar -->
            <item name="colorPrimary">#F44336</item>
            <!--   darker variant for the status bar and contextual app bars -->
            <item name="colorPrimaryDark">#B71C1C</item>
            <!--   theme UI controls like checkboxes and text fields -->
            <item name="colorAccent">@color/accent_red</item>
            <item name="android:navigationBarColor">#F44336</item>
    </style>
</resources>

0 个答案:

没有答案