开发者

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);
     }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜