How do you disable the positive button of an Android AlertDialog
by default?
It appears to be quite normal to want the positive button (In this case "Save") to be disabled before the user has made a change to the view (In this case an EditText
.
I know that I can get the button by calling dialog.getButton(DialogInterface.BUTTON_POSITIVE)
but this call will return null if show()
hasn't been called yet.