I'm searching a solution to change textColor of the Option menu items of the HoneyComb's actionBar when items have :
android:showAsAction="ifRoom|withText"
I try a lot of different solutions but none works on my project ... Can someone help me?
Here's what I put in the file style.xml
<resources>
<style name="theme.app" parent="android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:titleTextStyle">@style/ActionBarTitle</item>
<item name="android:subtitleTextStyle">@style/ActionBarSubTitle</item>
<item name="android:background">@drawable/action_bar_background</item>
<item name="android:paddingLeft">10dp</item>
<item name="android:actionMenuTextColor">#fff</item>
</style>
<style name="ActionBarTitle" parent="@style/ActionBar">
<item name="android:textColor">@color/blanc</item>
<item name="android:shadowDx">0</item>
<item name="android:shadowDy">0</item>
</style>
<style name="ActionBarSubTitle" parent="@style/ActionBar">
<item name="android:textColor">@color/blanc</item>
</style>
</resources>
P.S. : Sorry if there are any spelling mistakes but I'm a french.
I think you just have android:actionMenuTextColor
in the wrong place. It's an attribute on the theme, not the action bar style:
<resources>
<style name="MyTheme" parent="android:style/Theme.Holo.Light">
...
<item name="android:actionMenuTextColor">#f00</item>
...
</style>
</resources>
A few other things:
<sdk>/platforms/android-13/data/res/values/
, specifically at attrs.xml
, themes.xml
, and styles.xml
.android:actionMenuTextAppearance
to provide a text appearance (a collection of size/style/color/etc. information) all at once.ActionBarTitle
style to have @style/ActionBar
as a parent style.