您可以为 Spinner 创建自定义主题。例子:
样式.xml
<style name="TextAppearanceSpinnerItem" parent="android:TextAppearance.Widget.TextView.SpinnerItem">
<item name="android:textColor">#000</item>
<item name="android:textSize">10sp</item>
</style>
<style name="SpinnerItem" parent="android:Widget.TextView.SpinnerItem">
<item name="android:textAppearance">@style/TextAppearanceSpinnerItem</item>
</style>
<style name="SpinnerTheme" parent="android:Theme">
<item name="android:spinnerItemStyle">@style/SpinnerItem</item>
</style>
现在将您的自定义主题应用于具有微调器的活动,例如:
<activity
android:name="MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/SpinnerTheme
android:windowSoftInputMode="adjustResize|stateHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
希望这会帮助你。