Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActionBarSherlock hardkey menu panel text color

I have a small question about theming my app that uses ActionBarSherlock. Everything works fine except on Samsung phones with TouchWizz. The overflow menu items appear by pressing the hardware menu key.

I know how to change the panel background. My default theme extends Theme.Sherlock.Light.DarkActionBar, so the default menu item text color in the hardware panel will be black, I wan't to change this.

Any ideas on how to do this besides changing the parent of my default theme?

<style name="Theme.MyApp" parent="@style/Theme.Sherlock.Light.DarkActionBar">
    <item name="android:panelBackground">@drawable/menu_hardkey_panel</item>
</style>

enter image description here

like image 291
Levente Kürti Avatar asked Jan 16 '13 13:01

Levente Kürti


1 Answers

I'm not sure if I understand what you want to do, but if you want to change textColor in this panel you can create custom style with parent set to TextAppearance.Sherlock.Widget.PopupMenu and then change textColor property. Like this:

<style name="Widget.MyApp.ActionBarPopupLargeTextColor" parent="TextAppearance.Sherlock.Widget.PopupMenu.Large">
<item name="android:textColor">@color/black</item>
</style>

<style name="Widget.MyApp.ActionBarPopupSmallTextColor" parent="TextAppearance.Sherlock.Widget.PopupMenu.Small">
    <item name="android:textColor">@color/black</item>
</style>

Worked for me :)

like image 199
Michał Z. Avatar answered Oct 23 '22 18:10

Michał Z.