Creating A List Application
<p>I'm trying to create a simple list application for my first app. I have a hello world application running successfully on my droidx2 but when I change the code for a list it gives me a bunch of errors in the code. </p>

<p>The XML:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp"
    android:textSize="16sp" &gt;
&lt;/TextView&gt;
</code></pre>

<p>The .java file</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  setListAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.list_item, COUNTRIES));

  ListView lv = getListView();
  lv.setTextFilterEnabled(true);

  lv.setOnItemClickListener(new OnItemClickListener() {
    public void onItemClick(AdapterView&lt;?&gt; parent, View view,
        int position, long id) {
      // When clicked, show a toast with the TextView text
      Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
          Toast.LENGTH_SHORT).show();
    }
  });
}
</code></pre>

<p>This code might look familiar to you guys if you looked at a list example on the <a href="http://developer.android.com/resources/tutorials/views/hello-listview.html" rel="nofollow">android development</a> pages. </p>

<p>Do I need to import certain packages to get this to work?</p>

<p>EDIT: After installing the packages it fixed a lot of errors. I'm stilling getting an error here:   <code>setListAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.list_item, COUNTRIES));</code> It doesn't like list_item. I fexed the COUNTRIES problem.</p>

<p>EDIT 2: I figured out the problem. I never created the list_item.xml. Once that is created then the error is gone.</p>
