title: How to set a cancel button in Progress Dialog?
body: <p>I want to set a cancel button in my <code>ProgressDialog</code>. Below is my code:</p>
  
  <pre><code>myDialog = new ProgressDialog(BaseScreen.this);
  myDialog.setMessage("Loading...");
  myDialog.setCancelable(false);
  myDialog.show();
  </code></pre>
  
  <p>I want to set a button with an <code>onClickListener</code> on this <code>ProgressDialog</code>.
  I tried with this code:</p>
  
  <pre><code>myDialog.setButton("Cancel", new OnClickListener() {        
      @Override
      public void onClick(DialogInterface dialog, int which) {
          // TODO Auto-generated method stub          
          myDialog.dismiss();
      }
  });
  </code></pre>
  
  <p>But it isn't working. I tried other similar listeners also, but still no success.
  How can I solve this problem?</p>