使用另一个主题而不是当前主题来设计 Spinner

Styling Spinner with another theme rather than current one

我目前正在为我的应用程序使用 Theme.AppCompat.Light。但是因为我不喜欢默认微调器的外观,所以我想使用 Theme.Holo.Light 微调器外观。

我如何为某个小部件强制设置样式?

谢谢

在您的布局中 XML 您可以轻松指定视图/小部件的样式。因此,在您的情况下,您可以选择具有以下样式的较旧的 Holo 微调器样式:

<Spinner
    style="@android:style/Widget.Holo.Light.Spinner"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>