这是我像微调器一样绘制按钮的解决方案:
<Button
android:id="@+id/my_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:gravity="center_vertical|left"
android:enabled="true"
android:text="@string/my_button_text"
android:textColor="@color/my_button_color"
style="@style/MyButton" />
这是我的 res/values/styles.xml 的一部分:
<style name="MyButton" parent="@android:style/Widget.Spinner">
</style>
这是我的 res/values-v14/styles.xml 的一部分:
<style name="MyButton" parent="@android:style/Widget.DeviceDefault.Light.Spinner">
</style>