4
我想在单击微调项目下拉菜单时更改颜色。 我通过themes.xml,styles.xml和attr.xml搜索了一切,但是我可以找到要设置哪个属性来实现这一点。Spinner dropdownitem必须更改哪些样式属性?
在attr.xml有
<attr name="spinnerDropDownItemStyle" format="reference" />
在的themes.xml在默认themse有
<style name="Theme">
...
<item name="spinnerDropDownItemStyle">@android:style/Widget.DropDownItem.Spinner</item>
<item name="spinnerItemStyle">@android:style/Widget.TextView.SpinnerItem</item>
...
当我按照这style.xml我不能找到任何条目的背景可绘制(与选择器按下和聚焦)被分配(我想必须有一个地方参考xml文件与s内部的选民,如按钮)。
简而言之:我无法找到必须设置如何才能更改微调器下拉项目的点击和焦点外观。
单独的背景可以通过
<style name="CustomSpinnerAppearance0" parent="android:style/Widget.Holo.Light.Spinner">
<item name="android:background">@drawable/spinner_default0</item>
<item name="android:dropDownSelector">#ffc0c0c0</item>
<item name="android:popupBackground">#ffc0c0c0</item>
</style>
改变,但即使我设置一个选择或转换为popupBackground没有在点击行为发生变化。
任何想法?
谢谢。