I want to delay seconds and show Toast,I try to SystemClock.sleep
But it only show last message("10s")...
Toast.makeText(MainActivity.this,"1s", Toast.LENGTH_SHORT).show();
SystemClock.sleep(5000);
Toast.makeText(MainActivity.this,"5s", Toast.LENGTH_SHORT).show();
SystemClock.sleep(5000);
Toast.makeText(MainActivity.this,"10s", Toast.LENGTH_SHORT).show();
That should be displayed in sequence 1s, 5s, 10s is not it?
I also made reference to this practice, but it can not be achieved... How to set delay in android?
So does the problem lie?