Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi every one . i am using the ProgressDialog in my project , but i have a little with that ! indeed i use it when i want to redirect to other activities . but unfortunately when i come back to the first activity , it still works !
so how can i cancel the dialog after Redirecting to other activities ?!

Java
ProgressDialog.show(this, "Loading ...", " pleas wait");
Intent i=new Intent(this,Content.class); 
i.putExtra("Actype", "news");
startActivity(i);
Posted

 
Share this answer
 
you can close the ProgressDialog with dismiss function. somthing like this:


if(ProgressDialog != null) {
ProgressDialog.dismiss();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900