I'm trying to skin the options menu on android. I have the background color changed with a custom theme, but I can't get the text color to change for some reason.
My Theme
<style name="default" parent="@android:style/Theme.NoTitleBar">
<!-- Menu panel colors -->
<item name="android:panelBackground">@color/optionsMenuBackgroundColor</item>
<item name="android:panelFullBackground">@color/optionsMenuBackgroundColor</item>
<!-- Menu item colors -->
<item name="android:itemTextAppearance">@style/OptionsMenuFont</item>
</style>
My Style for the options menu font
<style name="OptionsMenuFont" parent="@android:style/TextAppearance.Widget.IconMenu.Item">
<item name="android:textColor">@drawable/menu_item_font</item>
</style>
My drawable for the button color selector menu_item_font.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Put other state colors up top -->
<item android:color="@color/optionsMenuTextColor" />
</selector>
That color is just a hex color #c4c4c4
What am I missing here?
You can change the text color but it should go under the textColor tag. You can't put a drawable in any textColor (neither in styles, nor in layouts). If you want to change the color, change your style to this:
<style name="OptionsMenuFont" parent="@android:style/TextAppearance.Widget.IconMenu.Item">
<item name="android:textColor">#c4c4c4</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With