Code example for CheckBox

Methods: isChecked

0
            mSegmentIndex = segmentIndex;
        } 
 
        public void onClick(View v) {
            final CheckBox segment = (CheckBox) getChildSegmentAt(mCheckedSegment);
            if (mSegmentIndex == mCheckedSegment && !segment.isChecked()) {
                segment.setChecked(true);
            } else { 
                notifyListener(mSegmentIndex, true);
            } 
        } 
 
    } 
 
    private class SegmentCheckedListener implements OnCheckedChangeListener {
 
        private final int mSegmentIndex;
 
        private SegmentCheckedListener(int segmentIndex) {
            mSegmentIndex = segmentIndex;
        }