title: Launching a ListActivity from another Activity
body: <p>I am creating an application that saves GPS coordinates; I have created a button which launches a new Activity to display, as a list all the save coordinates. The program crashes a soon as I hit the button, here is what I am doing.</p>
  
  <p>class 1:</p>
  
  <pre><code>        public void openLatLonData(View view)
      {
          Intent intent = new Intent(this, GpsDataList.class);
          ArrayList&lt;String&gt; allLocalStrings = new ArrayList&lt;String&gt;();
          for(int i =0; i&lt; AllLocals.size();i++)
          {
              allLocalStrings.add(AllLocals.get(i).getLat());
              allLocalStrings.add(AllLocals.get(i).getLon());
          }
          intent.putStringArrayListExtra("data", allLocalStrings);
          startActivity(intent);
      }
  </code></pre>
  
  <p>This method calls the new activity:</p>
  
  <pre><code>public class GpsDataList extends ListActivity
  </code></pre>
  
  <p>{</p>
  
  <pre><code>/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle bundleIn) 
  {
      super.onCreate(bundleIn);
      Intent intent = getIntent();
      ArrayList&lt;String&gt; listData = new ArrayList&lt;String&gt;();
  
      listData = intent.getStringArrayListExtra("data");
  
      this.setListAdapter(new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_list_item_1, listData));
    getListView().setTextFilterEnabled(true);
  
    //finish();
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>the button contains the following XML:</p>
  
  <pre><code>    &lt;Button android:layout_height="wrap_content" 
  android:text="Show Collected Data" 
  android:id="@+id/view_lat_lon_data" 
  android:layout_width="wrap_content"
  android:onClick="openLatLonData"&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>And I have added a new .xml file named gpsdatalist.xml under the res/layout folder:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Lastly the manifest contains this: .</p>
  
  <p>I believe I have all the pieces in play- Hopefully someones see the mistake
  Thanks in advance guys!</p>