https://kotlinlang.org logo
Title
u

user

07/15/2022, 12:11 AM
Button android studio, how to create a button that stops setonclicklistener function? I have a button such as I have created a setOnClickListener method and inside their is a loop. val btnClickMe1 = findViewById(R.id.button) btnClickMe1.setOnClickListener { //do something here 20 times } This method works fine, however, I have created a .apk file. When I click the button the function runs. I want to know how I can exit the loop by clicking the same button. Regardless of whether or not the loop has...