Redman Redman - 1 year ago 184
Android Question

Display Progress bar while delay?

In my app i want to have a delay of 5 seconds and in this five seconds user should see progress dialog
i tried this;
try {
} catch (InterruptedException e) {


but while Thread is sleeping the progessdialog also wont show .

Answer Source
 new CountDownTimer(6000, 1000) {
            public void onFinish() {
              // my whole code

            public void onTick(long millisUntilFinished) {

This works fine

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download