【发布时间】:2014-02-04 23:58:38
【问题描述】:
我需要在 android 切换按钮中更改两边的颜色。我尝试在我的 xml 文件中使用 android:textColorHighlight,但它似乎不起作用。这是我的代码:
<Switch
android:id="@+id/sdrt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:textColorHighlight="@android:color/holo_green_dark"
android:textOff="0"
android:textOn="1" />
如何更改 android switch 中选中和未选中按钮的背景颜色?
【问题讨论】:
标签: android android-layout switch-statement background-color