Reputation: 7536
Hi I am building small android application in which I tried to change color for action-bar but it is not working for me. I tried it in following way:
// in values/themes.xml.
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="android:colorPrimary">#0097a7</item>
<item name="android:colorPrimaryDark">#0097a7</item>
<item name="android:colorAccent">#0097a7</item>
<!-- <item name="colorPrimary">@color/primary</item> -->
</style>
I am using appcompat_7.But above styling is not working for me. Am I doing something wrong. Need some help.
Upvotes: 0
Views: 253
Reputation: 363825
With the appcompat v21, you have to remove the android: attribute
.
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">#0097a7</item>
<item name="colorPrimaryDark">#0097a7</item>
<item name="colorAccent">#0097a7</item>
</style>
To use these styles you have to compile your project with API 21.
Upvotes: 1