使用多状态按钮ToggleButton

2016-07-21  白云 

一、ToggleButton的介绍

1、ToggleButton有两种状态:选中和未选中状态

并且需要为不同的状态设置不同的显示文本

2、ToggleButton属性

android:checked="true",代表当前ToggleButton是否被选中

android:textOff="关"

android:textOn="开"

二、使用ToggleButton按钮实现开关效果


359°/3593 人阅读/0 条评论 发表评论

登录 后发表评论