title: "Content has view with id attribute 'android.r.id.list' that is not a ListView Class." when create a list view in a fragment
body: <p>Here is the problem. I have a list view, and it looks fine in the building, but it broke the error.
  Content has view with id attribute 'android.r.id.list' that is not a ListView Class.</p>
  
  <p>I haven't added the listview into the XML, something like :@android:list, the reason I didn't do that is I could find some examples which they no need to create such of xml list, so what should i do now? </p>
  
  <p>How to fix it? thanks!</p>
  
  <p>Code for the Fragment.java</p>
  
  <pre><code>package com.example.demo3;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  
  
  import android.app.Activity;
  import android.app.ListFragment;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.SimpleAdapter;
  import android.widget.TextView;
  
  public class ContactsFragment extends ListFragment {
  
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View contactLayout = inflater.inflate(R.layout.contacts_layout,
                  container, false);
          return contactLayout;
      }
  
      @Override
      public void onActivityCreated(Bundle savedInstanceState) {
          super.onActivityCreated(savedInstanceState);
  
          Activity currentActivity = getActivity();
  
          SimpleAdapter adapter = new SimpleAdapter(currentActivity, getData(),
                  R.layout.contacts_layout,
                  new String[] { "title", "info", "img" }, new int[] {
                          R.id.friend_name, R.id.friend_sex, R.id.friend_img });
  
          setListAdapter(adapter);
  
      }
  
      private List&lt;Map&lt;String, Object&gt;&gt; getData() {
          List&lt;Map&lt;String, Object&gt;&gt; list = new ArrayList&lt;Map&lt;String, Object&gt;&gt;();
  
          Map&lt;String, Object&gt; map = new HashMap&lt;String, Object&gt;();
          map.put("title", "G1");
          map.put("info", "google 1");
          map.put("img", R.drawable.background_login);
          list.add(map);
  
          map = new HashMap&lt;String, Object&gt;();
          map.put("title", "G2");
          map.put("info", "google 2");
          map.put("img", R.drawable.background_login);
          list.add(map);
  
          map = new HashMap&lt;String, Object&gt;();
          map.put("title", "G3");
          map.put("info", "google 3");
          map.put("img", R.drawable.background_login);
          list.add(map);
  
          return list;
      }
  
      private TextView findViewById(int testmessage) {
          // TODO Auto-generated method stub
          return null;
      }
  
  }
  </code></pre>
  
  <p>code for 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"
      android:orientation="horizontal" &gt;
  
      &lt;ImageView
          android:id="@+id/friend_img"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_margin="5px" /&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:id="@+id/friend_name"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textColor="#000000"
              android:textSize="22px" /&gt;
  
          &lt;TextView
              android:id="@+id/friend_sex"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textColor="#000000"
              android:textSize="13px" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>updated:
  I have added the </p>
  
  <pre><code>&lt;ListView
      android:id="@android:id/list"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1" &gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>into the XML.
  Although the image/name/sex has shown, but they are not inside the list, seems the list is a separate element. Any idea to let me to put the image/name/sex into the list layout? THXXX!</p>