changing Message for ProgressDialog android
<p>I have an ProgressDialog where in shows while sending mail. The progress dialog works across activities and classes as one of the blog had given an hint showing ProgressDialog across activities.</p>

<p>Below is the code as I am overriding onCreateDialog()</p>

<pre><code>@Override
protected Dialog onCreateDialog(int id) {
if(id == ID_SENDING_MAIL){
ProgressDialog loadingDialog = new ProgressDialog(this);
loadingDialog.setMessage("Sending Email...");
loadingDialog.setIndeterminate(true);
loadingDialog.setCancelable(true);
return loadingDialog;
}

return super.onCreateDialog(id);
}
</code></pre>

<p>then I call the mail sending as below</p>

<pre><code>showDialog(ID_SENDING_MAIL);
                new Thread(new Runnable(){
                public void run(){`//I am calling Mail Send here 

dismissDialog(Email.ID_SENDING_MAIL);
                }
                }).start();`
</code></pre>

<p>In run method I instantiate mail class and send host of parameters.
This is working fully but I want to set different messages to ProgressDialog.
Like at the time of connecting to Host
     Sending Mail then
     Mail Sent Successfully</p>

<p>How could we carry out those changes when used with onCreateDialog().
Looking forward to your reply.
thanks.</p>
