【发布时间】:2014-03-04 12:27:09
【问题描述】:
我正在尝试更改开关的背景。它正在改变,但问题是某些文本是可见的。
下面是我的代码
<Switch
android:id="@+id/switchsubsurf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="68dp"
android:padding="5dip"
android:textOff=" "
android:textOn=" "
android:thumb="@drawable/toggle_button"
android:track="@drawable/toggle_bg" />
【问题讨论】:
-
为什么这里有很大的空间 android:textOff=" " android:textOn=" "??
-
stackoverflow.com/questions/10118050/…看看这个链接..我认为这会有所帮助。
-
试试 android:button="@null"
-
嗨,我尝试了你指定的内容,但我仍然在 switch 中看到一些“0”、“1”。
-
toggle_button 和 toggle_bg 是自定义文件吗??
标签: android