android - Changing background color of actionbar -


my android app uses minimum sdk version 15. trying change background color of actionbar , want changing style , theme. i've tried many things background remains dark. here styles like:

<style name="apptheme" parent="@style/theme.appcompat.light.darkactionbar">     <item name="android:actionbarstyle">@style/myactionbar</item> </style> <style name="myactionbar" parent="@android:style/widget.holo.light.actionbar">     <item name="android:background">#eeeeee</item> </style> 

in manifext set application's theme apptheme.

by default appcompat support library uses value of colorprimary attribute color of actionbar.

<style name="apptheme" parent="theme.appcompat.light.darkactionbar">     <item name="colorprimary">#eeeeee</item> </style> 

but if want make color of actionbar independent primary color of theme, can set this:

<style name="apptheme" parent="theme.appcompat.light.darkactionbar">     <item name="actionbarstyle">@style/actionbar</item> </style>  <style name="actionbar" parent="widget.appcompat.actionbar.solid">     <item name="background">@color/primary_teal_500</item> </style> 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -