code: public void dialog(final int title, int list, DialogInterface.OnClickListener listener) {
          AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
          builder.setTitle(title)
                  .setItems(list, listener);
          builder.create().show();
      }
docs: Open a dialog with single choice list
  
  @param title
  @param list
  @param listener