title: Android ProgressDialog OnClickListener with Back button issue
body: <p>I am having some tab-type activities where a user can navigate from one activity to another, on clicking button tabs in the top. When clicking on any of the tabs, a ProgressDialog appears, with a "Loading..." view. I want to manage it, because during the loading process, if a user presses the back button it goes back to the previous activity.</p>
  
  <p>I have tried implementing this using ProgressDialog's onClickListener, but I am having 2 issues.</p>
  
  <p><strong>First</strong> issue is during the loading dialog: If user clicks anywhere on the screen the onClickListener of progress dialog triggers. I don't want this to happen; it should only be triggered from back the button.</p>
  
  <p><strong>Second</strong> issue is when "Loading..." appears, my onClickListener works for 1 or 1.5 seconds while it is visible for around 2-3 seconds. If I press the back button after 1 or 1.5 sec. the progress dialog listener does not do anything and remains on the same activity?</p>