如何将PrimaryDark颜色更改为白色?

时间:2019-02-07 19:24:11

标签: android android-studio android-layout

[[图像] 2]

如何将“主要深色”更改为“白色” ????

  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>

    <item name="windowActionBar">false</item>
</style>

1 个答案:

答案 0 :(得分:1)

我认为您是在谈论白色(浅色)状态栏,您可以通过在您的主题

中添加这些行来实现
<style name="AppTheme" parent="Theme.AppCompat.Light">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@android:color/white</item>
    <item name="colorAccent">@color/colorAccent</item>

    <item name="android:statusBarColor">@android:color/white</item>
    <item name="android:windowLightStatusBar">true</item>
</style>

但是它仅适用于 SDK> = 23