OnCheckedChangeListener和setChecked之间冲突问题解决
判断是否点击!buttonView.isPressed()来解决
CompoundButton.OnCheckedChangeListener checkedChangeListener = new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (switchCheckedListener == null) {
return;
}
if (!buttonView.isPressed()) {
return;
}
switchCheckedListener.checked(isChecked);
}
};