How can I make a jackpot slot in android studio

15 hours ago 2
ARTICLE AD BOX

I thought I would make a button event that changes the imageview url, but the setImageResource method is somehow doesn't allow putting string. that made me sad :(

how can i do this?

String[] animais = {"cachorro.jpg", "gato.jpg", "pato.jpg", "tartaruga.jpg"}; protected ImageView slot1, slot2, slot3; String um = ""; String dois = ""; String tres = ""; int um1 = rd.nextInt(3); int dois2 = rd.nextInt(3); int tres3 = rd.nextInt(3); um = animais[um1]; dois = animais[dois2]; tres = animais[tres3]; slot1.setImageResource(R.id.um);
Read Entire Article