如何更改溢出菜单项的背景

2023-12-24

我正在尝试更改溢出菜单中聚焦/按下的菜单项的蓝色背景。

我正在谈论这个:

我想我已经覆盖了所有可能的属性Themeand Theme.Holo in Themes.xml并去了每个风格Styles.xml但无法更改蓝色背景。

EDIT
我发现我应该覆盖的样式是android:dropDownListViewStyle

但它根本不起作用。 但后来我改变了主题Theme.Holo.Light.DarkActionBar to Theme.Holo.Light你猜怎么着?有效!!

那么,有人能解释一下吗?我怎样才能改变主题的颜色DarkActionBar??


好的,我找到了解决我的问题的方法:链接到 ActionBarSherlock google 群组中的帖子 https://groups.google.com/forum/?fromgroups#!msg/actionbarsherlock/AxB6shftiK0/HbvsrBgMpsoJ

我已经监督了这个条目:android:actionBarWidgetTheme in the Theme.Holo.Light.DarkActionBar theme.

现在我所要做的就是定义一个覆盖的主题Theme.Holo其中只有一种风格:<item name="android:dropDownListViewStyle">@style/myDropDownListView</item>并指出这个主题。

<!-- theme referenced by actionBarWidgetTehme style -->
<style name="Theme.DropDown.Dark" parent="android:style/Theme.Holo">
    <item name="android:dropDownListViewStyle">@style/myDropDownListView</item>
</style>

<!-- my main theme -->
<style name="DarkActionBarRedActionMode" parent="android:style/Theme.Holo.Light.DarkActionBar">
    <item name="android:actionBarWidgetTheme">@style/Theme.DropDown.Dark</item>
</style>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何更改溢出菜单项的背景 的相关文章

随机推荐