I'm new on Stack Overflow and I want to learn answer this question please don't give me negative reputation.
How can I change background color with random time and everytime on Android Studio ? I'm using Kotlin language.
var counter:Int =0
if (Random.nextBoolean())
background.setBackgroundColor(Color.GREEN)
else
background.setBackgroundColor(Color.RED)
btn_touch.setOnClickListener {
counter += 1
textCounter.text = counter.toString()