kyleduo / SwitchButton

A cute widget of Switch Button for you to create beautiful and friendly UI.
4.71k stars 867 forks source link

发现一个问题,求解决 #81

Closed chlss closed 7 years ago

chlss commented 7 years ago

在调用setSwitchStates的时候,setOnCheckedChangeListener被调用了,怎么解决!

kyleduo commented 7 years ago

看ReadMe的Usage部分。


From version 1.4.1 on, SwitchButton support operation without onCheckedChanged callback. It makes changing state in code more convenient. Using these methods to achieve that feature.

setCheckedNoEvent(boolean) setCheckedImmediatelyNoEvent(boolean) toggleNoEvent() toggleImmediatelyNoEvent()