You are using AlertDialog.Builder.setItems()
method which dismisses a dialog when an item is clicked.
In order to display a list of items and not have the dialog dismissed, you should use one of the overloads of setSingleChoiceItems()
method:
Set a list of items to be displayed in the dialog as the content, you will be notified of the selected item via the supplied listener. The list will have a check mark displayed to the right of the text for the checked item. Clicking on an item in the list will not dismiss the dialog. Clicking on a button will dismiss the dialog.