I am developing an Android application where I have a check box and a button (programmable) screen. When I click the user's button I want to check up to three check boxes.
I expected that there will be something like the check box group in Android, but unfortunately it is not so.
Can anyone help me with it?
Try something like that.
chkIos = ( Checkbox) findViewById (R.id.chkIos); ChkAndroid = (checkbox) FindbackIID (RID.chackAndroid); ChkWindows = (checkbox) FindbiBid (RIDCank Window); Btndisplay = (button) Find VVBIID (RID.b.T.DISISplay); BtnDisplay.setOnClickListener (New OnClickListener () {// When the button is clicked, then click on @ Override Public Zero (see v) {if (chkIos.isChecked ()} chkAndroid.isChecked () || ChkWindows.isChecked ()) {{Some believe it}}}); } Edit: - Yes, but if you have been dynamically linked then you trust at least the number of checkboxes, say checkbox [] check = new checkbox [maxcount]; Click your button
@Override Click on Public Zero (see V) {// (int i = 0; i & lt ; Check.length; I ++) {if (check [1] .isChecked () || ....) {// Your verification is here ..}}
No comments:
Post a Comment