Answers for "how to put delay in android studio"

4

delay a method in android

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

android studio delay

new CountDownTimer(30000, 1000) {

     public void onTick(long millisUntilFinished) {
         mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
     }

     public void onFinish() {
         mTextField.setText("done!");
     }
  }.start();
Posted by: Guest on February-18-2021

Code answers related to "how to put delay in android studio"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language