title: Error: ArrayAdapter requires the resource ID to be a TextView
body: <p>What does this mean?  I have been fighting with this <code>ListView</code> that I have using an <code>ArrayAdapter</code>.  I wrote this nice dialog fragment that I have calling back to an updateUI listner cause I want to update this <code>ListView</code> I have in my fragment from the <code>DialogFragment</code> at first the <code>ArrayAdapter</code> was a complex type of a class i Created:</p>
  
  <pre><code>ArrayAdapter&lt;Location&gt; theLocations;
  ...
  //in oncreateview
  theLocations = new ArrayAdapter&lt;Location&gt;(mContext, R.layout.location_row, locations);
  //here locations is an ArrayList&lt;Location&gt;
  </code></pre>
  
  <p>then I have: </p>
  
  <pre><code>public void onUIUpdate(Location l) { //called from dialog fragment      
   locations.add(l);                  
   theLocations.notifyDataSetChanged();       
  }
  </code></pre>
  
  <p>then that gave the above error so I switched it to use just a </p>
  
  <pre><code>String[] locationNames = new String[sizeofLocations];
  theLocations=new ArrayAdapter&lt;String&gt;(mContext, R.layout.location_Row, locationNames );
  
  public void onUIUpdate(Location l) {        
      locations.add(l);                   
              locationNames = new String[locations.size()];
              for(locations.size() etc...) { 
                 locationNames [i] = new String(locations.get(i).getName());
              }
      theLocations.notifyDataSetChanged();        
  }
  </code></pre>
  
  <p>this didn't error out in my update method (That updates the ui) but it didn't update anything. So I am lost as to how to update this ArrayAdapter, I thought notifyChange was supposed to do it, but it either does nothing or throws the above error.</p>
  
  <p>I have no issues with my SimpleCursorAdapters elsewhere in my program (As long as my cursors remain open and i call a requery on them).</p>
  
  <p>Any insights into what I am doing wrong?</p>
  
  <p>Upon request here is my layout for the R.layout.location_row</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_height="wrap_content" android:layout_width="fill_parent"     android:orientation="horizontal"&gt;   
  &lt;TextView android:text="@+id/TextView01" android:layout_height="wrap_content" android:id="@+id/location_name"
      android:textSize="15px" android:layout_marginTop="10px" android:layout_width="wrap_content"&gt;&lt;/TextView&gt;
  &lt;TextView android:text="|" android:layout_height="wrap_content" 
      android:textSize="15px" android:layout_marginTop="6px" android:layout_width="wrap_content"&gt;&lt;/TextView&gt;
  &lt;TextView android:text="@+id/TextView01" android:layout_height="wrap_content" android:id="@+id/location_lat"
      android:textSize="15px" android:layout_marginTop="6px" android:layout_width="wrap_content"&gt;&lt;/TextView&gt;
  &lt;TextView android:text="|$" android:layout_height="wrap_content" 
      android:textSize="15px" android:layout_marginTop="6px" android:layout_width="wrap_content"&gt;&lt;/TextView&gt;  
  &lt;TextView android:text="@+id/TextView01" android:layout_height="wrap_content" android:id="@+id/location_lon"
      android:textSize="15px" android:layout_marginTop="6px" android:layout_width="wrap_content"&gt;&lt;/TextView&gt;
  &lt;/LinearLayout&gt; 
  </code></pre>