delay methods call android java code example
Example 1: handler delay android
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
//Do something after 100ms
}
}, 100);
Example 2: handler delay android
Handler().postDelayed({
//Do something after 100ms
}, 100)