I have a button that on Click loads another action, but before it loads another action, if I press it continuously, then it starts the action, but the same action is loaded two or more times. I tried button.setEnabled (false) shortly after button.setOnClickListener ... onClick but it doesn’t turn off the button, I also register the text right after the button is pressed, so depending on my taps it registers the text 2 or 3 times, even if I pressed it 10 times. I feel that before the button listens for click events, I press it so fast that it listens to all these events as many times as I click on it.
So I need something where the button can just listen to one tap and then turn it off.
please, help
source
share