setlistadapter problem I don't know how this works at all
<p>I'm having trouble with the setListAdapter(). It tells me to just create the method because it doesn't know anything about it. I'm, for now, just trying to get a list to populate and I don't even know what this code is doing. </p>

<pre><code>public class PassScreen extends Activity {
TextView selection;
ArrayList&lt;String&gt; items = new ArrayList&lt;String&gt;();
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.passwordscreen);
    selection=(TextView)findViewById(R.id.selection);

    try { 
        InputStream in=getResources().openRawResource(R.raw.words);
        DocumentBuilder builder=DocumentBuilderFactory.newInstance().newDocumentBuilder();
        Document doc = builder.parse(in,null);
        NodeList words=doc.getElementsByTagName("word");
        for (int i =0;i&lt;words.getLength();i++){
            items.add(((Element)words.item(i)).getAttribute("value"));
        }
        in.close();
    }
    catch (Throwable t){
        Toast.makeText(this, "Exception: " + t.toString(), 2000).show();
    }

            setListAdapter(new ArrayAdapter&lt;String&gt;(this,
            android.R.layout.simple_list_item_1,
            items));

}
public void onListItemClick(ListView parent, View v, int position, long id){
    selection.setText(items.get(position).toString());
}
}
</code></pre>

<p>As you can see I have and xml file that I'm using. That looks just like what the book looks like but then again I copy and pasted the setListAdapter() so I guess that's not all that helpful. </p>

<p>If you could also show me what the setListAdapter() is doing that would be great. I can't seen to understand what google is talking about. </p>

<p>Here is the xml:</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_width="fill_parent"
android:layout_height="fill_parent"&gt;

&lt;TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/&gt;

&lt;ListView
  android:id="@android:id/list"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:drawSelectorOnTop="false"/&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>And some of the words xml:</p>

<pre><code>&lt;words&gt;
&lt;word value="lorem"/&gt;
&lt;word value="ipsom"/&gt;
&lt;word value="dolor"/&gt;
&lt;/words&gt;
</code></pre>

<p>Also can you explain what's going on? I don't understand the setListAdapter() at all. Or just point to Googles white paper. I can't find it. It's not like I know how to look that stuff up anyway. </p>
