J
J
James_Bazinger2020-08-31 06:20:35
Kotlin
James_Bazinger, 2020-08-31 06:20:35

How to disable a button temporarily after activating the same button?

After activation, you need to block the same button for a certain time.
Need sample code

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timur Pokrovsky, 2020-08-31
@Makaroshka007

button.setOnClickListener {
    it.isEnabled = false
    it.postDelayed({ it.isEnabled = true }, 5000)
}

Q
qqweer, 2020-08-31
@hawkkiller

What does your button do?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question