SwitchCompat(开关按钮)
2023-01-24 09:16:15 最后更新
cls("android.support.v7.widget.SwitchCompat",sc)
javanew(sctv,sc,"Context",activity)
//打开时文字
javax(null,sctv,sc,"setTextOn","CharSequence","on")
//关闭时文字
javax(null,sctv,sc,"setTextOff","CharSequence","off")
//是否显示文字
javax(null,sctv,sc,"setShowText","boolean",true)
//设置显示的文本
us(sctv,"text","枭燚砸")
//设置显示的文本颜色
us(sctv,"textcolor","#ff0000")
//事件可使用ssj设置,用法和选择控件一样
nvw(sctv,1)