如果用户已经按下该按钮,我需要停止显示AlertDialog(即在OnCreate中)。如果已经点击了肯定按钮,我需要禁用AlertDialog。Android - 如果按钮已被点击,停止显示AlertDialog
AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this);
dlgAlert.setMessage(getString(R.string.dialogMSG));
dlgAlert.setTitle("App Support Checker");
dlgAlert.setPositiveButton(R.string.yesdev,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
dlgAlert.setCancelable(false);
dlgAlert.create().show();
谢谢,我alredy有一个setNegativeButton,但我需要隐藏alertDialog ...你能帮忙吗? – user2606414