ActionBarSherlock hardkey menu panel text color

牧云@^-^@ 提交于 2019-12-05 00:29:57

Here are the correct attrs to tune hardware menu style. You should look at panelColorForeground ;-)

<item name="android:panelColorBackground">#FFFFFF</item>
<item name="android:panelColorForeground">@color/primary_text_holo_dark</item>
<item name="android:panelFullBackground">@drawable/menu_background_fill_parent_width_holo_dark</item>
<item name="android:panelTextAppearance">@style/Holo.TextAppearance</item>

Tested on HoloEverywhere lib and 2.3 emulator. See attrs doc for details.

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 :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!