How to finish ProgressDialog from onBackPressed
<p>I am using progress bar for showing progress. But when I'm pressing the back button it keep showing progress bar.I don't want it. how to remove it.
My code for calling Progress circle is-</p>

<pre><code>    public void onClick(final View v) {
    ProgressCircle progressBar = new ProgressCircle();
    progressBar.start(v.getContext());
    click(v);
    if(progressBarStatus==1)
    {
        progressBar.stop();
    }
}
</code></pre>

<p>Following is the click(View) method:</p>

<pre><code>Intent intent = new Intent(AddFriend.this, AddFriendSend.class); 
startActivity(intent);
</code></pre>

<p>Following is the Progress Circle class:</p>

<pre><code> public class ProgressCircle {
private ProgressDialog progressBar;

public void start(Context context) {
    ProgressDialog progressBar = new ProgressDialog(context);
    progressBar.setCancelable(true);
    progressBar.setMessage("Processing...");
    progressBar.setProgressStyle(ProgressDialog.STYLE_SPINNER);

    progressBar.setProgress(0);
    progressBar.setMax(100);
    progressBar.show();
}

public void stop() {
    if (progressBar != null) {
        progressBar.dismiss();

    }
}
}
</code></pre>

<p>Please help me out.</p>