disable a button in android studio xml code example Example: disable button in android studio myButton.setEnabled(false);