code: private OnClickListener createSingleChoiceListener() {
          return new OnClickListener() {
  
              @Override
              public void onClick(final DialogInterface dialog, final int position) {
                  String text = getString(R.string.single_choice_listener_text);
                  showToast(String.format(text, position));
              }
  
          };
      }
docs: Creates and returns a listener, which allows to show a toast, which indicates when a single
  choice list item of a dialog has been selected or unselected.
  
  @return The listener, which has been created, as an instance of the type {@link
  OnClickListener}