Answers for "android add delay before calling function"

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
0

handler delay android

final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
  @Override
  public void run() {
    //Do something after 100ms
  }
}, 100);
Posted by: Guest on July-30-2020
0

handler delay android

Handler().postDelayed({
  //Do something after 100ms
}, 100)
Posted by: Guest on July-30-2020

Code answers related to "android add delay before calling function"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language