问题描述
我有关于我的主题化的应用程序,使用ActionBarSherlock一个小问题。一切正常,除了在三星手机与TouchWizz
。溢出的菜单项出现由pressing硬件菜单键。
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.
我知道如何更改面板背景。我的默认主题延伸 Theme.Sherlock.Light.DarkActionBar
,所以在硬件面板中的默认菜单项的文字颜色将是黑色
,我wan't改变这一点。
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>
推荐答案
下面是正确的ATTRS调整硬件的菜单风格。你应该看看的 panelColorForeground 的; - )
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>
测试在HoloEverywhere lib和2.3模拟器。的请参见 ATTRS文档了解详细信息。
Tested on HoloEverywhere lib and 2.3 emulator.See attrs doc for details.
这篇关于ActionBarSherlock硬键菜单面板文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!