嗨,大家看看下面的代碼...我在我的應用程序中使用進度條,但它不顯示當我使用dialog.dismiss()但顯示如果我不使用此方法,但問題然後是它不會消失...... 任何幫助傢伙......?進度條不顯示
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();
問題是您對dialog1有問題嗎?或者警報有問題? – ootinii 2012-04-25 19:11:58
問題是對話框1的進度對話框... – kashifmehmood 2012-04-26 05:52:36