Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android L Preview actionbar color

As stated here I should be able to change the color of my ActionBar if I define a primary color in my style.

<style name="AppTheme" parent="android:Theme.Material">
    <item name="android:colorPrimary">#ff0000</item>
</style>

However the color is still the grayish default color. Am I missing something?

like image 517
Kuno Avatar asked Jun 28 '14 12:06

Kuno


2 Answers

As the docs say, you should use @android:style/Theme.Material as your parent theme, not android:Theme.Material.

Then you should be able to use <item name="android:colorPrimary">#ff0000</item> like you did already.

like image 168
nhaarman Avatar answered Sep 20 '22 11:09

nhaarman


There is a values-21 folder... I made the changes in the values folder and of course it has not been used.

like image 21
Kuno Avatar answered Sep 20 '22 11:09

Kuno