From the official introduction http://developer.android.com/intl/zh-cn/training/basics/actionbar/styling.html
This article belongs to the small black _mo all, reprint please explain out http://my.oschina.net/moziqi/
Themes.xml
<?xml version= "1.0" encoding= "Utf-8"?><resources> <!-- the theme applied to the application or activity --> <style name= "Customactionbartheme" parent= "@style/theme.appcompat.light.darkactionbar "> <item name=" Android:actionbarstyle "> @style/ myactionbar</item> <!-- Support library compatibility --> <item name= " Actionbarstyle "> @style/myactionbar</item> </style> <!-- actionbar styles --> <style name= "MyActionBar" parent= "@style/widget.appcompat.light.actionbar.solid.inverse" > <item name= "Android:bAckground "> @drawable/actionbar_background</item> < Item name= "Android:titletextstyle" > @style/myactionbartitletext</item> <!-- Support library compatibility--> <!--Modify Background--> <item name= " Background "> @drawable/actionbar_background</item> < !--Modify the font color of Actionbar--> <item name= "TitleTextStyle" > @style/myactionbartitletext</item> </style> < !-- actionbar title text --> <style name= " Myactionbartitletext " parent=" @style/textappearance.appcompat.widget.actionbar.title "> < item name= "Android:textcolor" > #FFFFFF </item> <!-- The textColor property is backward compatible with the support library --> </style> <!-- Actionbar tabs text --> <style name= "MyActionBarTabText" parent= "@style/widget.appcompat.actionbar.tabtext" > <item name= "Android:textcolor" > #FFFFFF </item> <!-- The textColor property is backward compatible with the Support library --> </style></resources>
I like the colors.xml.
<?xml version= "1.0" encoding= "Utf-8"?><resources> <color name= "BUTTON_OK" > #1E88E5 </color> & Lt;color name= "White" > #FFFFFF </color> <color name= "green" > #0aa770 </color></resources>
(Android) Actionbar theme style, compatible with more than 2.1