I am trying to achieve 2 things
All this on XML.
What works, after experiments?
Text color for Menu item has no effect anywhere. In the example code when I declare MenuTextStyle in the main Theme tag, I am able to change text size but not color.
<style name="Theme.SexyApp" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/Widget.SexyApp.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.SexyApp.ActionBar</item>
<item name="android:actionBarItemBackground">@drawable/list_state</item>
<item name="actionBarItemBackground">@drawable/list_state</item>
<item name="android:actionMenuTextAppearance">@style/Theme.SexyApp.ActionBar.MenuTextStyle</item>
<item name="actionMenuTextAppearance">@style/Theme.SexyApp.ActionBar.MenuTextStyle</item>
</style>
<style name="Widget.SexyApp.ActionBar" parent="@style/Widget.Sherlock.Light.ActionBar">
<item name="android:displayOptions">showHome|useLogo|showTitle</item>
<item name="android:titleTextStyle">@style/Theme.SexyApp.ActionBar.TextAppearance</item>
<item name="titleTextStyle">@style/Theme.SexyApp.ActionBar.TextAppearance</item>
</style>
<style name="Theme.SexyApp.ActionBar.TextAppearance" parent="@style/TextAppearance.Sherlock.Widget.ActionBar.Title">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">20dp</item>
<item name="android:textStyle">bold</item>
<item name="android:shadowColor">#333333</item>
<item name="android:shadowRadius">1</item>
<item name="android:shadowDy">1</item>
</style>
<style name="Theme.SexyApp.ActionBar.MenuTextStyle" parent="@style/TextAppearance.Sherlock.Widget.ActionBar.Menu">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">13dp</item>
<item name="android:textStyle">bold</item>
<item name="android:shadowColor">#333333</item>
<item name="android:shadowRadius">1</item>
<item name="android:shadowDy">1</item>
</style>
To change the menu item text color, you need to add the actionMenuTextColor item to your theme style as in the code below:
<style name="ThemeName" parent="@style/Theme.Sherlock.Light">
<item name="actionMenuTextColor">@color/white</item>
<item name="android:actionMenuTextColor">@color/white</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