title: How to display an arraylist in AlertDialog
body: <p>i'm trying to get an arraylist on alert dialog but i can see the list items only if i click them. any idea whats wrong with the below code .any suggestions pls....</p>
  
  <pre><code>ArrayList&lt;String&gt; matches = data.getStringArrayListExtra(
                      RecognizerIntent.EXTRA_RESULTS); 
  
   AlertDialog.Builder builder = new AlertDialog.Builder(this);
  
   final ArrayAdapter&lt;String&gt; aa1=new ArrayAdapter&lt;String&gt;(getApplicationContext(), android.R.layout.simple_list_item_single_choice, matches);
         builder.setSingleChoiceItems(aa1, 0, new DialogInterface.OnClickListener() {
              public void onClick(DialogInterface dialog, int item) {
  
                  numbers.add(aa1.getItem(item));
                  aa.notifyDataSetChanged();
                  dialog.dismiss();
              }
  
          });
   alert = builder.create();
   alert.show();
  </code></pre>