Android ProgressDialog OnClickListener with Back button issue
===

Iam having some tab type activities and user can navigate from one activity to another on clicking button tabs on top..on clicking on any tab a ProgressDialog appears having message as Loading...i want to manage something like this as if during loading process if user click back button then it goes back to previous activity..I have implemented this using progressdialog onclicklistener but having 2 issues :: one is during loading dialog if user clicks anywhere on the screen the onclicklistener of progress dialog triggers(this should not happen..it should be triggered only from back button only) coz we have to do this on back button press only..  :: second issue is as loading appears my onclicklistener works eventually for 1 or 1.5 seconds while it is visible for around 2-3 seconds.. if after 1 or 1.5 sec i click on back button the  progress dialog listener doesn't do anything and remains on the same activity?help me guys
thanx in advance....
