Answers for "delay 1 seconds android studio"

2

how to wait a few seconds in android studio

Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                public void run() {
                    // yourMethod();
                }
            }, 5000);   //5 seconds
Posted by: Guest on August-30-2020
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

Browse Popular Code Answers by Language