How to uncheck the CheckBox, when limit exceeds in android?
Hello I am New to Android, My requirement is allow the user to check maximum 3 number of checkboxes. when user is trying to check fourth one 开发者_运维知识库should populate dailogue. Iam trying but the problem is fourth one is not unchecking...
can any one help me...
Regards Shiva.M
Just uncheck the checkbox using the following code block:
final CheckBox checkBox = (CheckBox) findViewById(R.id.checkbox_id);
if (checkBox.isChecked()) {
checkBox.setChecked(false);
}
精彩评论