I have been trying to figure out how to set the action bar color in Android Studio. All guides say to simply name the item or the style. What am I doing wrong? The Action Bar is set to white but I dont set the background to be white anywhere with any colors
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"> <color name="colorPrimaryDark">#33691E</color> <color name="colorPrimary">#8BC34A</color> <color name="colorPrimaryLight">#D4FF5A</color> <color name="colorPrimaryLightHella">#FFFFCC</color> <color name="colorAccent">#B2FF59</color> <color name="white">#FFFFFF</color> <color name="notwhite">#000000</color> <color name="grey">#999999</color> <style name="Theme.MaterialButton_Deactivated" parent="AppTheme"> <item name="colorAccent">@color/grey</item> <item name="colorButtonNormal">@color/white</item> </style> <style name="Theme.MaterialButton" parent="AppTheme"> <item name="colorAccent">@color/colorAccent</item> <item name="colorButtonNormal">@color/white</item> </style> <style name="Theme.MaterialButton_White" parent="AppTheme"> <item name="colorAccent">@color/white</item> <item name="colorButtonNormal">@color/colorPrimaryDark</item> <item name="android:textColor">@color/colorPrimaryDark</item> </style> <style name="MyTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"> <item name="android:textColor">@color/colorAccent</item> </style> <style name="AppTheme" parent="Base.Theme.AppCompat.Light"> <item name="android:actionBarStyle">@color/colorPrimaryDark</item> <!-- Customize your theme here. --> <item name="android:statusBarColor">@color/colorPrimaryDark</item> <!-- your app branding color for the app bar --> <item name="android:colorPrimary">@color/colorPrimary</item> <!-- darker variant for the status bar and contextual app bars --> <item name="android:colorPrimaryDark">@color/colorPrimaryLight</item> <!-- theme UI controls like checkboxes and text fields --> <item name="android:colorAccent">@color/colorAccent</item> </style> <style name="MyCustomTheme" parent="AppTheme"> <item name="android:actionBarStyle">@style/MyActionBarTheme</item> </style> <style name="MyActionBarTheme" parent="AppTheme"> <item name="android:background">@color/colorPrimary</item> </style> </resources>
No comments:
Post a Comment