question: private void updateButtonState ( ) { Button clearButton = mDialog . getButton ( AlertDialog . BUTTON_POSITIVE ) ; if ( clearButton != null ) clearButton . setEnabled ( ! mSelectedOptions . isEmpty ( ) ) ; }
target:  Disable the "Clear" button if none of the options are selected. Otherwise, enable it.