/**
  * 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.
  *
  * @param itemsId the resource id of an array i.e. R.array.foo
  * @param checkedItem specifies which item is checked. If -1 no items are checked.
  * @param listener notified when an item on the list is clicked. The dialog will not be
  *     dismissed when an item is clicked. It will only be dismissed if clicked on a button, if
  *     no buttons are supplied it's up to the user to dismiss the dialog.
  * @return This
  */
 public Builder setSingleChoiceItems(
     @ArrayRes int itemsId, int checkedItem, final DialogInterface.OnClickListener listener) {
   builder.items(itemsId);
   builder.itemsCallbackSingleChoice(
       checkedItem,
       new MaterialDialog.ListCallbackSingleChoice() {
         @Override
         public boolean onSelection(
             MaterialDialog dialog, View itemView, int which, CharSequence text) {
           listener.onClick(dialog, which);
           return true;
         }
       });
   return this;
 }