I already saw a few questions regarding this, but none with java that I could understand, so here's my problem:
I have a an ArrayList called playableCards with 6 drawables:
ArrayList<Image> playableCards =new ArrayList<>(
R.drawable.image1,
R.drawable.image2,
R.drawable.image3,
R.drawable.image4,
R.drawable.image5,
R.drawable.image6);
In my Activity I have 3 ImageViews: imageView1 imageView2 imageView3
I need these 3 ImageViews to each display one drawable from playableCards, but none should be displayed twice.
The User can click each ImageView and by doing so, one of the remaining drawables of playableCards should replace the drawable before.
So if the User clicks imageView1, which currently displays a random drawable, lets say R.drawable.image3, it should change to another drawable of playableCards that isn't displayed in the other 2 ImageViews...
Does someone know how that is possible?
Aucun commentaire:
Enregistrer un commentaire