0

I'm trying to tweak my app with some custom colors but I cannot change the text color of the action bar.

This is how it is currently showing: Example

If you look close you might see letters in the white tab bar. I'm trying to change this color to black without changing anything else of the action bar.

This is how my styles.xml looks like:

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="android:actionBarStyle">@style/ActionBar</item>
</style>

<style name="ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@color/default_green</item>
    <item name="android:backgroundStacked">@color/stacked_white</item>
    <item name="android:backgroundSplit">@color/sa_green</item>
</style>

Any help is appreciated.

Niels
  • 659
  • 2
  • 7
  • 15
  • refer this this is also my own ans http://stackoverflow.com/questions/22858381/change-text-color-and-selector-in-tabwidget/22858550#22858550 – Bhanu Sharma Apr 08 '14 at 10:41
  • Did you try this post : http://stackoverflow.com/questions/8024706/how-do-i-change-the-background-color-of-the-actionbar-of-an-actionbaractivity-us Hope this helps – Developer Apr 08 '14 at 10:43

2 Answers2

1

You can make your custom theme here:

http://jgilfelt.github.io/android-actionbarstylegenerator/

Which includes all tabs and other component.

Yashdeep Patel
  • 3,090
  • 1
  • 17
  • 21
  • Just a quick solution would be nice instead of implementing a whole new style. If I don't get any better suggestions I'll do that. – Niels Apr 08 '14 at 11:06
0

Try this ... This should be in the theme

<item name="actionBarTabTextStyle">@style/tabtextcolor</item>
<item name="android:actionBarTabTextStyle">@style/tabtextcolor</item>

This should be where you define the tab text color.

<style name="tabtextcolor" parent="@style/Widget.Sherlock.ActionBar.TabText">
    <item name="android:textColor">@android:color/white</item>
</style>
Yashdeep Patel
  • 3,090
  • 1
  • 17
  • 21