title: Why must I have a listview?
body: <p>I'm trying to implement a password-protected preferences screen.  I press the menu button then the settings button and instead of the password screen showing up, it FCs and I receive this error:</p>
  
  <pre><code>Uncaught handler: thread main exiting due to uncaught exception
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.john.websafe/com.john.websafe.Preferences}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
       &lt;snip&gt;
  Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
       at android.app.ListActivity.onContentChanged(ListActivity.java:236)
       at android.preference.PreferenceActivity.onContentChanged(PreferenceActivity.java:160)
       at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:312)
       at android.app.Activity.setContentView(Activity.java:1626)
       at com.john.websafe.Preferences.onCreate(Preferences.java:19)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
       ... 11 more
  </code></pre>
  
  <p><code>Preferences.java</code> line 19:</p>
  
  <pre><code>setContentView(R.layout.password);
  </code></pre>
  
  <p>Password.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:orientation="vertical" android:layout_width="fill_parent"
  android:layout_height="fill_parent"&gt;
  
  &lt;TextView android:layout_width="wrap_content"
      android:layout_height="wrap_content" 
      android:text="@string/password" /&gt;
  
  &lt;EditText android:id="@+id/password" android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:scrollbars="vertical" /&gt;
  
  &lt;Button android:id="@+id/confirm" 
    android:text="@string/confirm"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>What is causing this error?  Why do I need a listview whose id is <code>android.R.list</code>?  I don't even <em>have</em> a <code>ListActivity</code>...  Does a <code>PreferenceActivity</code> include a <code>ListActivity</code>?</p>