title: Easy way to add images to an Android ListView
body: <p>I have a lisview that I want to add images to. The examples that I found early on showed using simple_list_item_1, but it doesn't seem to allow what I want.</p>
  
  <p>If possible, I would also like to be able to change the color of items indepentantly of each other. So the text of One would be red, Two blue, etc.</p>
  
  <p>main.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="vertical"&gt;
  
      &lt;TextView android:id="@+id/textHeader"
           android:textSize="24px"
           android:textColor="#006699"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content" 
           android:gravity="center_horizontal"
           /&gt;
      &lt;ListView  
           android:id="@android:id/list"
           android:layout_width="fill_parent" 
           android:layout_height="wrap_content"
           /&gt;
       &lt;TextView android:id="@android:id/empty"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Empty set"
           /&gt;
  &lt;TextView
      android:id="@+id/status_text"
      android:layout_width="fill_parent"
      android:layout_height="0dip"
      android:layout_weight="1"
      /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>main.java </p>
  
  <pre><code>public class sGuide extends ListActivity {
      private String[] mBooks = new String[]{ "One", "Two", "Three" };
  
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          ArrayAdapter&lt;String&gt; booksAdapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, mBooks);
  
          this.setListAdapter(booksAdapter);
      }
  
      @Override
      protected void onDestroy() {
          super.onDestroy();
          //mChecker.onDestroy();
      }
  }
  </code></pre>
  
  <p>Edit: here is my new row layout. I would like to make it so that tapping anywhere on the row selects it, instead of having to tap the image or label.</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="wrap_content"
      android:layout_height="wrap_content" &gt;
  
      &lt;ImageView
          android:id="@+id/icon"
          android:layout_width="45dp"
          android:layout_height="45dp"
          android:layout_marginLeft="4dp"
          android:layout_marginRight="10dp"
          android:layout_marginTop="4dp"
          android:src="@drawable/icon"
           &gt;
      &lt;/ImageView&gt;
  
      &lt;TextView
          android:id="@+id/label"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginTop="11dp"
          android:layout_marginBottom="9dp"
          android:text="@+id/label"
          android:textSize="22dp" &gt;
      &lt;/TextView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Edit 2: Changed the linear layout to fill parent instead of wrap text. Now it works.</p>