<how to assign a condition to an imageView by usin...
# stackoverflow
u
how to assign a condition to an imageView by using if else? I tried to show a random imageView out of 2(one,two) with this binding.imageView.setImageResource(oneandtwo[random.nextInt(oneandtwo.size)]) it works fine and i wanted to increase score when i clicked on imageView but score increases independent to that, sometimes increases when i clicked on imageView2 and sometimes imageView, i want to increase score when i only clicked on imageView. i couldnt figure out. Thanks in advance. var score = 0 val oneandtwo: IntArray = intArrayOf(...