3.30

开关按钮ToggleButton和开关Switch:

核心属性:

ToggleButton(开关按钮):

  • android:disabledAlpha:设置按钮在禁用时的透明度
  • android:textOff:按钮没有被选中时显示的文字
  • android:textOn:按钮被选中时显示的文字 另外,除了这个我们还可以自己写个selector,然后设置下Background属性即可~
原文地址:https://www.cnblogs.com/20193898liufa/p/14908965.html