How to “wait” a Thread in Android

You need the sleep method of the Thread class.

public static void sleep (long time)

Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds). The precision is not guaranteed – the Thread may sleep more or less than requested.


time The time to sleep in milliseconds.

Leave a Comment