private <T> void adjustButtonEnablement(final ItemSelectModel<T> model, final AlertDialog dialog) {
        //special handling if some buttons are marked as "enabled only if something is selected"
        if (model.selectionIsMandatory != null) {
            final boolean somethingSelected = !model.getSelectedItems().isEmpty();
            if (model.selectionIsMandatory.length > 0 && model.selectionIsMandatory[0] && positiveButton != null) {
                dialog.getButton(DialogInterface.BUTTON_POSITIVE).setEnabled(somethingSelected);
            }
            if (model.selectionIsMandatory.length > 1 && model.selectionIsMandatory[1] && negativeButton != null) {
                dialog.getButton(DialogInterface.BUTTON_NEGATIVE).setEnabled(somethingSelected);
            }
            if (model.selectionIsMandatory.length > 2 && model.selectionIsMandatory[2] && neutralButton != null) {
                dialog.getButton(DialogInterface.BUTTON_NEUTRAL).setEnabled(somethingSelected);
            }
        }
    }
Use this method to create and display a 'select multi' dialog using the model data provided
<p>
A 'select multi' dialog allows the user to select multiple (or no) value out of a given list of choices

@param options           the item select options
@param selectionListener convenient listener which is called when "positive" button is clicked
main/src/main/java/cgeo/geocaching/ui/dialog/SimpleDialog.java