【发布时间】:2016-09-29 11:19:18
【问题描述】:
可以打勾
togglebutton吗?
布局如下
<ImageView
android:id="@+id/donePic"
android:src="@mipmap/done"
android:tint="@color/red"
android:paddingLeft="320dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
目前button 的刻度是ImageView。如何使 ImageView 变为 toggleButton ?是否可以 ?
【问题讨论】:
-
Make a tick togglebutton... 为什么不用CheckBox呢?即:tutorialspoint.com/android/android_checkbox_control.htm -
@Rotwang 谢谢你的建议,会试试的。
-
嗯,它是现成的,开箱即用,所以不需要重新发明轮子.. ;)
-
但是如果我想要一个勾选切换按钮(如上图),红色取消勾选,勾选时绿色。有可能吗?
标签: android android-imageview togglebutton