I have 10 different checkboxes and 10 different images linked to the checkbox. 1 image(which is not used for the checkboxes) is visible and the rest is invisible. I want my app to add the corresponding picture to the app when the checkbox has been checked. However, I can't find information regarding images and checkboxes online.
So I thought about an array of checkboxes with the image file.
images[0] = R.drawable.imageID;
images[1] = R.drawable.imageID;
images[2] = R.drawable.imageID;
images[3] = R.drawable.imageID;
images[4] = R.drawable.imageID;
images[5] = R.drawable.imageID;
images[6] = R.drawable.imageID;
images[7] = R.drawable.imageID;
images[8] = R.drawable.imageID;
images[9] = R.drawable.imageID;
i've seen allot of OnClick but I think OnCheck is better, but there isn't allot of information about onCheck.. Now i'm a bit lost :/
Can anyone help me get in the right direction?
thnx in advance
Aucun commentaire:
Enregistrer un commentaire