android - Display Progress bar while delay? -
in app want have delay of 5 seconds , in 5 seconds user should see progress dialog tried
progressdialog.show(); try { thread.sleep(5000); } catch (interruptedexception e) { e.printstacktrace(); } progressdialog.dismiss();
but while thread sleeping progessdialog wont show .
new countdowntimer(6000, 1000) { public void onfinish() { mprogressdialog.dismiss(); // whole code } public void ontick(long millisuntilfinished) { mprogressdialog.show(); } }.start();
this works fine
Comments
Post a Comment