Error Binding An ArrayAdapter of strings to a ListVew :( Help
<p>I don't know how to bind a ListView to an Array of strings I am pulling out of a resource file.  Android.</p>

<p>Here is the code I have so far after hours and hours of trying to figure it out.  I can't find any clear documentation that really explains to me how to do this.  Conceptually, it feels right to me, so maybe I am missing some core Android domain knowledge.</p>

<p>Here is the specific problem in the log:</p>

<p>03-23 02:38:40.169: ERROR/AndroidRuntime(1156): Caused by: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView</p>

<p>Here is the code I am using:</p>

<h2>Main.xml</h2>

<p>
</p>

<pre><code>&lt;ListView android:id="@+id/menuMain"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
&gt;
    &lt;TextView android:id="@+id/menuMain_item"  
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;
    &lt;/TextView&gt;
&lt;/ListView&gt; 
</code></pre>

<p></p>

<h2>strings.xml</h2>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;resources&gt;
    &lt;string name="app_name"&gt;App Systems&lt;/string&gt;
    &lt;array name="mainMenuItems"&gt;
        &lt;item&gt;Item 1&lt;/item&gt;
        &lt;item&gt;Item 2&lt;/item&gt;
        &lt;item&gt;Item 3&lt;/item&gt;
        &lt;item&gt;Item 4&lt;/item&gt;
    &lt;/array&gt;
&lt;/resources&gt;
</code></pre>

<h2>main.java</h2>

<pre><code>package com.appsystems.appname;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class Main extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ListView menuMain = (ListView)findViewById(R.id.menuMain);
        String[] mainMenuItems = getResources().getStringArray(R.array.mainMenuItems);
        ArrayAdapter&lt;String&gt; aa;


        aa = new ArrayAdapter&lt;String&gt;(this, R.id.menuMain_item, mainMenuItems);

        menuMain.setAdapter(aa);
    }
}
</code></pre>
