@SuppressWarnings("PMD.NPathComplexity")
    private <T> void selectItems(final ItemSelectModel<T> options, final Consumer<Set<T>> selectionListener) {
        final ItemSelectModel<T> model = options == null ? new ItemSelectModel<>() : options;
        final boolean selectionConfirmedViaButton = model.getChoiceMode() == SimpleItemListModel.ChoiceMode.MULTI_CHECKBOX || model.singleSelectWithOk;

        //Prepare Buttons
        if (model.selectSetSupplier != null) {
            this.setNeutralButton(model.selectSetActionText);
        }
        if (!selectionConfirmedViaButton && buttonClickAction == null) {
            //remove "negative/positive" buttons
            setPositiveButton(null);
            setNegativeButton(null);
        }

        if (this.title == null) {
            this.title = TextParam.id(R.string.map_select_multiple_items);
        }

        final Pair<AlertDialog, SimpleDialogViewBinding> dialogBinding = constructCommons(r -> model.setFilterTerm(r == null ? null : r.toString()));
        final AlertDialog dialog = dialogBinding.first;
        final SimpleDialogViewBinding binding = dialogBinding.second;

        model.setDialog(dialog);

        binding.dialogItemlistview.setVisibility(View.VISIBLE);
        binding.dialogItemlistview.setModel(model);

        dialog.show();

        if (model.scrollAnchor != null) {
            binding.dialogItemlistview.scrollTo(model.scrollAnchor);
        }

        finalizeCommons(dialog, (which) -> {
            boolean handled = false;

            switch (which) {
                case DialogInterface.BUTTON_POSITIVE:
                    if (selectionListener != null) {
                        //default action on OK button is to close and pass selection to listener
                        selectionListener.accept(model.getSelectedItems());
                        dialog.dismiss();
                        handled = true;
                    }
                    break;
                case DialogInterface.BUTTON_NEUTRAL:
                    if (model.selectSetSupplier != null) {
                        //special handling: neutral button may be used to set predefined item combo
                        model.setSelectedItems(model.selectSetSupplier.get());
                        handled = true;
                    }
                    break;
                default:
                    //do nothing
                    break;
            }
            if (!handled && model.buttonClickedListener != null) {
                model.buttonClickedListener.call(model, which);
                handled = true;
            }
            return handled;
        });

        model.addChangeListeners(ct -> {
            adjustButtonEnablement(model, dialog);
            if (model.selectionChangedListener != null && ct == SimpleItemListModel.ChangeType.SELECTION) {
                model.selectionChangedListener.call(model);
            }
            if (!selectionConfirmedViaButton  && ct == SimpleItemListModel.ChangeType.SELECTION) {
                //special handling of "single immediate select" (on click)
                if (selectionListener != null) {
                    selectionListener.accept(model.getSelectedItems());
                }
                dialog.dismiss();
            }
        });
        adjustButtonEnablement(model, dialog);
    }
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