【发布时间】:2013-09-06 19:12:11
【问题描述】:
首先对不起我的英语。
我正在设计一个主题(使用 HoloEveryWhere)并尝试设置默认微调器的样式。
问题是 spinnerStyle 不起作用。我正在测试这个布局。
<Spinner
android:id="@+id/spCountry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/etPhone" />
我将它用于我的 theme.xml..
<item name="android:spinnerStyle">@style/Coloquium.Spinner.Ruby</item>
在styles.xml中
<style name="Coloquium.Spinner.Ruby" parent="@style/Holo.Spinner.Light">
<item name="android:background">@drawable/spinner_holo_white</item>
</style>
问题是微调器样式从未应用(其他样式,如edittextstyle或buttonstyle工作正常),背景永远不会改变,但我尝试这种风格作为spinnerItemStyle并且工作正常,但spinnerItemStyle是内部视图,我想设置外部的样式,即微调器。
如果我直接在布局节点中设置背景,背景变化很好,但我需要为主题中的所有微调器设置spinnerStyle,而不是在布局中。
我测试了很多帖子寻找没有成功的解决方案。
【问题讨论】:
标签: java android android-holo-everywhere