I use ActionBarSherlock to make the application compatible with older devices. The implementation was simple, but now I need to create the standard Holo blue line that you see under the tabs on the red line.
I read several topics ( topic 1 , topic 2 ) here on SO and also an ABS document ( link ), but I can't get it to work.
This is what I still have.
In my AndroidManifest.xml, I added this line to the application tag.
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Theme.Sherlock" >
Then in res/values/styles.xml i:
<resources> <style name="AppTheme" parent="android:Theme.Light" /> <style name="Theme.MyTheme" parent="Theme.Sherlock"> <item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item> </style> <style name="Widget.MyTheme.ActionBar" parent="Widget.Sherlock.ActionBar"> <item name="android:background">#ff000000</item> <item name="background">#ff000000</item> </style> </resources>
But when I launch my application, I still see the default blue line color.
What am I doing wrong?
EDIT
Read this if you want to completely create your ActionBarSherlock!
I found here an answer to SO that gave the following link: http://jgilfelt.github.com/android-actionbarstylegenerator
This is a simple generator that generates all the necessary files for a fully customizable ABS! All you have to do is copy the created files to the appropriate folders and install!
Remember to enable the style (you will need to enter the name of the style in the generator) in AndroidManifest. To do this, see the answer below.
source share