progress bar not showing
<p>hi guys check out the code below... i am using progress bar in my application but it is not showing when i use dialog.dismiss() but shows if i dont use this method but the problem then is that it does not go away.... 
any help guys...?</p>

<pre><code> AlertDialog.Builder builder = new AlertDialog.Builder(this);
                builder.setMessage("Are you sure you want to delete?")
                        .setCancelable(false)
                        .setPositiveButton("Yes",
                                new DialogInterface.OnClickListener() {
                                    public void onClick(DialogInterface dialog,
                                            int id) {
                                        `ProgressDialog` dialog1 = ProgressDialog.show(context, "", "Deleting...",true);
                                        // Log.v("", "You Clicked " + s);

                                        dba.delete("messages", "private = 0 and _id=?",
                                                new String[] { s });
                                        dba.close();
                                        populate();

                                    }
                                })
                        .setNegativeButton("No",
                                new DialogInterface.OnClickListener() {
                                    public void onClick(DialogInterface dialog,
                                            int id) {
                                        dialog.cancel();
                                    }
                                });

                AlertDialog alert = builder.create();
                alert.show();
                dialog1.dismiss();
</code></pre>
