0

I need to change text color for items in Action Bar:

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#FFFFFF</item>
    <item name="android:actionBarTabTextStyle">@style/CustomTabTextStyle</item>
    <item name="android:textColor">#000000</item>
</style>

<style name="CustomTabTextStyle" parent="@android:style/TextAppearance.Holo">
    <item name="android:actionMenuTextColor">#000000</item>
</style>

I can change background color, but text color I can't change. Please, how can I fix it?

malcoauri
  • 11,904
  • 28
  • 82
  • 137

1 Answers1

0

actionMenuTextColor needs to be set at the top level of the style, rather than within a nested style. Also, if you're using ActionBarSherlock it needs to not have the 'android:' in front for <v11, and have it in front for >=v11.

for <v11:

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#FFFFFF</item>
    <item name="actionMenuTextColor">#000000</item>
</style>

and for >v11:

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#FFFFFF</item>
    <item name="android:actionMenuTextColor">#000000</item>
</style>
straya
  • 5,002
  • 1
  • 28
  • 35