private void updateButtonState(){
  Button clearButton=mDialog.getButton(AlertDialog.BUTTON_POSITIVE);
  if (clearButton != null)   clearButton.setEnabled(!mSelectedOptions.isEmpty());
}

private void updateButtonState ( ) { Button clearButton = mDialog . getButton ( AlertDialog . BUTTON_POSITIVE ) ; if ( clearButton != null ) clearButton . setEnabled ( ! mSelectedOptions . isEmpty ( ) ) ; }
disable the " clear " button if none of the options are selected . otherwise , enable it .
