【发布时间】:2013-03-19 00:21:47
【问题描述】:
我在使用标准 android Switch 组件时遇到了一个奇怪的问题。
我已经分配了我的自定义跟踪器和拇指可绘制对象 - 一切看起来和工作正常,除了 textColor 属性的颜色始终是深色(可能是主题颜色)。
尝试通过 android:textColor 属性以十六进制分配颜色,作为资源和选择器。可惜每一次努力都未能达到改变的目标
有人遇到过这个问题吗?
这是我的用法:
<Switch
android:id="@id/settings_lock_screen_compound_btn"
android:layout_width="97dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:textOff="Off"
android:textOn="On"
android:textSize="12sp"
android:thumb="@drawable/switch_thumb"
android:track="@drawable/switch_track_bg" />
【问题讨论】:
标签: android components switch-statement textcolor