I know there are very few questions already posted on this thing. I filtered almost every post, but no luck and I am not getting the result which I have to get. First I tried code snippet#1, everything worked fine as in the image1. But now I must change the actionbar background to light and dull color, so did it, the result is activity's title and items' titles are in white color which are barely legible. So, decided to change the text color, but didn't get how to change it with my present code in the styles.xml. If someone could help me in changing the text color with present code(snippet#1) itself, that would be very great. As I didn't get how to modify the present code, I Followed this and so now my code is code snippet#2, now my action bar completely goes weird making the home icon and app title disappear and displays only the item that is towards right like the image 2. Can someone please help me resolve this issue?
code snippet#1
<style name="MyTheme" parent="Theme.Sherlock">
<item name="actionBarStyle">@style/MyActionBar</item>
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="android:windowBackground">@color/white</item>
</style>
<style name="MyActionBar" parent="Widget.Sherlock.ActionBar">
<item name="background">@drawable/action_bar_background</item>
<item name="android:background">@drawable/action_bar_background</item>
</style>
code snippet#2
<style name="MyTheme" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/CustomActionBar</item>
</style>
<style name="CustomActionBar" parent="android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@drawable/action_bar_background</item>
<item name="titleTextStyle">@style/ActionBarTitle</item>
</style>
<style name="ActionBarTitle" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">#000000</item>
</style>
Below are my images:
In the second image, title, icon and blue border line are disappeared. I have to show them because I am setting home enabled to true.
I used the link above from Archie.bpgc and created a style that used the Light - Dark Action Bar and that solved my problem by allowing me to pick the colors that I needed.
The above example did not work for me to change the text color.
The link: http://jgilfelt.github.com/android-actionbarstylegenerator/
I think you are trying to change the text color that is on the Menu, not the color of text that is in the Title in ActionBarSherlock.
When you use "getSupportActionBar (). SetTitle (" My Title ")" to style this text you should use the code of @Archie.bpgc. His answer is correct, but for having gone through this same problem, I believe that you are in need is the following code:
See that you simply exchange parent =" TextAppearance.Sherlock.Widget.ActionBar.Title "> by parent = "TextAppearance.Sherlock.Widget.ActionBar.Menu">
This is the most recommended for customizing an ActionBar:
http://jgilfelt.github.com/android-actionbarstylegenerator/
its easy too.
If you only want to change some Text color/size, try this: