ActionBarSherlock硬键菜单面板文本颜色面板、菜单、文本、颜色

2023-09-12 02:47:00 作者:我们不熟没必要矫情

我有关于我的主题化的应用程序,使用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.

 
精彩推荐
图片推荐