dimanche 10 novembre 2019

How to detect which element of array is shown in imageView?

I want to randomly set resource in imageView and after that, check which element in array is shown. How it could be possible? I'm begginer.

image_view.setImageResource(three[random.nextInt(three.size)])
            if (three[1]){
            //Do stuff
            }

In "three[1]" I'm getting error:

Type mismatch. 
Required:
Boolean
Found:
Int
Type mismatch. 
Required:
Boolean
Found:
Int



Aucun commentaire:

Enregistrer un commentaire