I want to make a pause between two lines of code, Let me explain a bit:
-> the user clicks a button (a card in fact) and I show it by changing the background of thi
If you use Kotlin and coroutines, you can simply do
GlobalScope.launch { delay(3000) // In ms //Code after sleep }
And if you need to update UI
GlobalScope.launch { delay(3000) GlobalScope.launch(Dispatchers.Main) { //Action on UI thread } }