Thread.sleep(10000) waits for 10 sec before execution of the program.
I want the code that waits the next task for 10 sec when the first task is running.
How do I execute the code with delay without clearing the screen?
Thread.sleep(10000) waits for 10 sec before execution of the program.
I want the code that waits the next task for 10 sec when the first task is running.
How do I execute the code with delay without clearing the screen?
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
//Do something after 100ms
}
}, 100);