Code example for CompoundButton

Methods: setChecked

0
 
    private class Listener implements CompoundButton.OnCheckedChangeListener {
        @Override 
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            if (!callChangeListener(isChecked)) {
                buttonView.setChecked(!isChecked);
                return; 
            } 
            setChecked(isChecked);
        } 
    } 
}