1

首先原谅我的英语。

我正在设计一个主题(使用 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,而不是在布局中。

我测试了很多帖子寻找没有成功的解决方案。

4

1 回答 1

2

解决方案是:

HoloEveryWhere 出现使用“spinnerStyle”而不是“android:spinnerStyle”。

但真的......我找不到关于此的 HoloEveryWhere 文档。:S

于 2013-09-06T18:00:20.270 回答