有没有办法在运行时禁用 AlertDialog 的正按钮,比如在 TextWatcher 中?
AlertDialog.Builder(this)
.setTitle(getString(R.string.createvfs))
.setView(newVSView_v11)
.setPositiveButton(getString(R.string.okay),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int whichButton) {
}
})
.setNegativeButton(getString(R.string.cancel),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int whichButton) {
// Canceled.
}
}).show();