title: Android: failed to setContentView when switching to ListActivity
body: <p>[update] I got the error, which says "Your content must have a ListView whose id attribute is 'android.R.id.list'". Appearently nothing in my xml is ListView. But is that required?</p>
  
  <p>This is an follow-up issue on my previous question
  <a href="https://stackoverflow.com/questions/2548304/android-which-view-should-i-use-for-showing-text-and-image">android: which view should I use for showing text and image?</a></p>
  
  <p>I read the article about creating ListView for LinearLayout. However, my following code failed at the setContentView() function when I changed "extends Activity" to "extends ListActivity", any idea why?</p>
  
  <pre><code>private TextView mSelection;
  //private ImageView mImages;
  static final String[] keywords = new String[]{"China", "Japan", "USA", "Canada"};
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.contactLayout);
  
      mSelection = (TextView)findViewById(R.id.ContactNames);
      ArrayAdapter adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.contactlayout, R.id.ContactNames,keywords);
      setListAdapter(adapter);
      }
  </code></pre>
  
  <p>My Layout is from this article: <a href="http://www.curious-creature.org/2009/02/22/android-layout-tricks-1/" rel="nofollow noreferrer">http://www.curious-creature.org/2009/02/22/android-layout-tricks-1/</a></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="?android:attr/listPreferredItemHeight"
  
  android:padding="6dip"&gt;
  
  &lt;ImageView
      android:id="@+id/icon"
  
      android:layout_width="wrap_content"
      android:layout_height="fill_parent"
      android:layout_marginRight="6dip"
  
      android:src="@drawable/icon" /&gt;
  
  &lt;LinearLayout
      android:orientation="vertical"
  
      android:layout_width="0dip"
      android:layout_weight="1"
      android:layout_height="fill_parent"&gt;
  
      &lt;TextView
          android:id="@+id/ContactNames"
          android:layout_width="fill_parent"
          android:layout_height="0dip"
          android:layout_weight="1"
  
          android:gravity="center_vertical"
          android:text="My Application" /&gt;
  
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="0dip"
          android:layout_weight="1" 
  
          android:singleLine="true"
          android:ellipsize="marquee"
          android:text="Simple application that shows how to use RelativeLayout" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>