I am creating one Progress dialog in my app. Below is my code...
ProgressDialog dialog = ProgressDialog.show(TabViewLayout.this, "", "Logout...");
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.isIndeterminate();
new Thread() {
public void run() {
try {
sleep(5000);
}
catch (Exception e) { }
}
}.start();
Handler handler = new Handler();
handler.post(new Runnable(){
public void run(){
dialog.dismiss();
}
});
What I have to do is, I have to put delay for 5 seconds in my app for some process. With above code, progress dialog is appearing on screen but spinner is not spinning. I want it in spinning mode for 5 seconds. What needs to be done?