title: Update listview items, that live in a AlertDialog
body: <p>I build an AlertDialog in a class that extends DialogFragment:</p>
  
  <pre><code>@Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
      super.onCreateDialog(savedInstanceState);
  
      Intent locationTypesIntent = new Intent(getActivity(), LocationTypesRetrieverService.class);
      getActivity().getApplicationContext().startService(locationTypesIntent);
  
      itemsOnList = new CharSequence[noOfItems];
      itemsChecked = new boolean[noOfItems];
      for(int i=0;i&lt;noOfItems;i++)
      {
          itemsOnList[i] = "Location " + i;
          itemsChecked[i] = true;
      }
  
      AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
      builder.setTitle("Filter locations")
             .setMultiChoiceItems(itemsOnList, itemsChecked, 
                     new DialogInterface.OnMultiChoiceClickListener() {
  
                      @Override
                      public void onClick(DialogInterface dialog, int which, boolean isChecked) {
                          System.out.println("clicked choice");                           
                      }
                  }
       );
      createdAlertDialog = builder.create();
      return createdAlertDialog;
  }
  </code></pre>
  
  <p>I then attempt to retrieve the list in the AlertDialog, and change the Adapter, in order to update the displayed items:</p>
  
  <pre><code>public void updateOptions(String[] optionsArray)
  {
      ListView list = createdAlertDialog.getListView();
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(getActivity().getApplicationContext(),list.getId(),optionsArray);
      list.setAdapter(adapter);
      //list.invalidate();
  }
  </code></pre>
  
  <p>I get an error:</p>
  
  <p>E/AndroidRuntime(9401): android.content.res.Resources$NotFoundException: Resource ID #0x1020403 type #0x12 is not valid</p>
  
  <p>What is going on???</p>