title: Populate list of custom view using ListFragment
body: <p>I am trying to show elements in a list view using Fragments. I created my custom view as follow</p>
  
  <p><strong>graphical representation of list_row.xml</strong></p>
  
  <p><img src="https://i.stack.imgur.com/C0vwk.png" alt="enter image description here"></p>
  
  <p><strong>list_row.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      android:padding="5dip" &gt;
  
      &lt;!-- ListRow Left sied Thumbnail image --&gt;
  
      &lt;LinearLayout
          android:id="@+id/thumbnail"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_marginRight="5dip"
          android:padding="3dip" &gt;
  
          &lt;ImageView
              android:id="@+id/list_image"
              android:layout_width="50dip"
              android:layout_height="50dip" 
              android:contentDescription="@string/image_desc"/&gt;
      &lt;/LinearLayout&gt;
  
      &lt;!-- Menu name --&gt;
  
      &lt;TextView
          android:id="@+id/menu_name"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignTop="@+id/thumbnail"
          android:layout_toRightOf="@+id/thumbnail"
          android:text="@string/menu_name"
          android:textColor="#040404"
          android:textSize="15sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;!-- Description --&gt;
  
      &lt;TextView
          android:id="@+id/description"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@+id/thumbnail"
          android:layout_below="@id/menu_name"
          android:layout_marginTop="1dip"
          android:layout_toRightOf="@+id/thumbnail"
          android:text="@string/description"
          android:textColor="#343434"
          android:textSize="10sp"
          tools:ignore="SmallSp" /&gt;
  
      &lt;!-- Price --&gt;
  
      &lt;TextView
          android:id="@+id/price"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_alignTop="@id/menu_name"
          android:layout_marginRight="5dip"
          android:gravity="right"
          android:text="@string/price"
          android:textColor="#10bcc9"
          android:textSize="10sp"
          android:textStyle="bold"
          tools:ignore="SmallSp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>In fragment.xml file, I simply put a list view inside a linear layout</p>
  
  <p><strong>fragment.xml</strong></p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/LinearLayout1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;ListView
          android:id="@+id/listView1"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
      &lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I have an array of menu objects, that has the necessary fields to populate list_row.xml like menu name, description, price and image. I couldn't find a way to fill fragment.xml's listView with the list_row elements. Any help or idea would be appreciated.</p>
  
  <p><strong>PS:</strong> I think in fragment.xml instead of <code>android:id="@+id/listView1"</code> field, I have to write <code>android:id="@id/list"</code> since I'm using ListFragment</p>