I am trying to change the background color of my action bar but it doesnt change. My app is using the AppCompat theme if that affects anything.
Here is my theme that is being used. My app points to use this theme so that is not the problem
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="actionBarStyle">@style/ActionBar</item>
</style>
<!-- Action Bar Styles -->
<style name="ActionBar" parent="Widget.AppCompat.ActionBar">
<item name="android:background">@color/blue</item>
<item name="background">@color/blue</item>
</style>
In your ActionBar style, delete the android:background, only keep the background attribute. Also make sure to implement your AppTheme in the application tag or in the activities extending the action bar in your AndroidManifest.xml file. I've also added the "@style/" attribute before Widget.AppCompat since its a default style defined in the android library.
Your code should look like this :
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="actionBarStyle">@style/ActionBar</item>
</style>
<!-- Action Bar Styles -->
<style name="ActionBar" parent="@style/Widget.AppCompat.ActionBar">
<item name="background">#0000ff</item>
</style>