As an explanation of @SID's answer, to style your Actionbar you need to redefine the whole theme of your application.
If they do not exist, add the Styles.XML and Colors.XML files to the Resource>values folder and edit them as shown below:
styles.xml:
<?xml version="1.0" encoding="utf-8" ?> <resources> <style name="AppTheme" parent="android:Theme.Holo.Light"> <item name="android:actionBarStyle">@style/ActionBarTheme</item> </style> <style name="ActionBarTheme" parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse"> <item name="android:background">@color/DarkBlue</item> </style> </resources>
Colors.XML:
<?xml version="1.0" encoding="utf-8" ?> <resources> <color name="DarkBlue">#007acc</color> </resources>
Now go to Properties>AndroidManifest.xml and change the <application> tag to link to your customized theme:
<application android:theme="@style/AppTheme" ... > </application>
UPDATE:
If you want to use AppCompat and ActionBarActivity , you will no longer need an ActionBarTheme in Styles.XML , this is what Styles.XML looks Styles.XML :
<?xml version="1.0" encoding="utf-8" ?> <resources> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/LightBlue</item> <item name="colorPrimaryDark">@color/DarkBlue</item> <item name="colorAccent">@color/Pink</item> </style> </resources>
And Colors.XML :
<?xml version="1.0" encoding="utf-8" ?> <resources> <color name="DarkBlue">#0052cc</color> <color name="Pink">#ff1ac6</color> <color name="LightBlue">#1a75ff</color> </resources>
source share