我试图改变聚焦/ $ P $的蓝色背景pssed菜单项中的溢出菜单。
I am trying to change the blue background of a focussed/pressed menuitem in the overflow menu.
我说的是这样的:
我想我已经覆盖从主题
和 Theme.Holo
每一个可能的属性在的themes.xml
并到各风格 Styles.xml
,但不能改变的蓝色背景。
I think I've overwritten every possible attribute from the Theme
and Theme.Holo
in Themes.xml
and went to each style in Styles.xml
but couldn't change the blue background.
修改
我想通了,样式我应该重写为安卓dropDownListViewStyle
EDIT
i figured out that the style i should override is android:dropDownListViewStyle
但它没有在所有的工作。
但后来我从 Theme.Holo.Light.DarkActionBar
主题,以 Theme.Holo.Light
键,你猜怎么着?它的工作!
but it didn't work at all.
but then i changed the theme from Theme.Holo.Light.DarkActionBar
to Theme.Holo.Light
and guess what? it worked!!
所以,任何人都可以揭示出这个一些轻?我该如何更改主题颜色与 DarkActionBar
??
so, can anyone shed some light on this?? how can i change the color on a theme with DarkActionBar
??
推荐答案
好了,我发现我的问题的解决方案:的链接ActionBarSherlock谷歌组中的帖子
ok, i found a solution for my problem: link to a post in the ActionBarSherlock google group
我一直监督此项:安卓actionBarWidgetTheme
在 Theme.Holo.Light.DarkActionBar
主题。
i've overseen this entry: android:actionBarWidgetTheme
in the Theme.Holo.Light.DarkActionBar
theme.
现在我所要做的就是确定一个主题,覆盖 Theme.Holo
有一个风格在里面:<项目名称=机器人:dropDownListViewStyle> @风格/ myDropDownListView< /项目>
并指向这个主题,而不是
now all i had to do is define a theme that overrides Theme.Holo
with one style in it: <item name="android:dropDownListViewStyle">@style/myDropDownListView</item>
and point to this theme instead.
<!-- 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>
相关推荐
最新文章