Code example for CompoundButton

Methods: setChecked

0
    public void setOnChangedListener(Listener l) {
        mListener = l;
    } 
 
    public void setChecked(boolean checked) {
        mToggle.setChecked(checked);
    } 
 
    public boolean isChecked() { 
        return mToggle.isChecked();
    } 
 
    public void setMax(int max) {
        mSlider.setMax(max);
    } 
 
    public void setValue(int value) {
        mSlider.setProgress(value);
    } 
}