Answers for "android studio delay kotlin"

3

kotlin delay

Timer().schedule(2000) {
    TODO("Do somefing")
}
Posted by: Guest on August-26-2021
1

how to call a function after delay in kotlin android

// Android 10+ Handler() is depricated
// Import
import android.os.Handler;
import android.os.Looper

val handler = Handler(Looper.getMainLooper())
handler.postDelayed({
  // do something after 1000ms
}, 1000)
Posted by: Guest on November-13-2020

Code answers related to "android studio delay kotlin"

Browse Popular Code Answers by Language