title: Android ListView row padding/margin
body: <p>I have a problem with my Android listview. My list uses a custom arrayadapter, that sets an onClickListener for the message image and the list has an onItemClickListener. It all works fine, but as you can see in the screenshot below, the image doesn't fill it's parent. 
  So when I click above, below or to the right of the image the onItemClickListener is called.</p>
  
  <p>My wish is to completely divide the row in two sections. And I believe the solution to this lies in the row.xml or the xml for the ListView. How can i fill the entire row with my image?</p>
  
  <p><a href="http://i.stack.imgur.com/63Hij.png" rel="nofollow">The Screen Shot</a></p>
  
  <p>row.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="?android:attr/listPreferredItemHeight"
  android:padding="6dip"
  android:background="@drawable/listitem_background"
  android:id="@+id/row2"&gt;
  &lt;ImageView
      android:id="@+id/icon"
      android:layout_width="wrap_content"
      android:layout_height="fill_parent"
      android:layout_marginRight="6dip"
      android:src="@drawable/logominimini" /&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/toptext"
          android:layout_width="fill_parent"
          android:layout_height="0dip"
          android:layout_weight="1"
          android:singleLine="true"
          android:textColor="@color/darkgreen"
          android:textStyle="bold"
          android:textAppearance="?android:attr/textAppearanceMedium"
      /&gt;
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="0dip"
          android:layout_weight="1"
          android:id="@+id/bottomtext"
          android:singleLine="true"
          android:ellipsize="marquee"
          android:textColor="@color/black"
      /&gt;
  &lt;/LinearLayout&gt;
       &lt;TextView 
           android:id="@+id/divider"
           android:layout_width="3dp"
           android:layout_height="fill_parent"
           android:background="@drawable/divider_background"
           android:visibility="gone"/&gt;
  &lt;ImageView
      android:id="@+id/selectmessage"
      android:layout_width="wrap_content"
      android:layout_height="fill_parent"
      android:layout_centerVertical="true"
      android:visibility="visible"
      android:paddingRight="20dp"
      android:paddingLeft="40dp"
      android:background="@drawable/listitem_background"
      android:layout_marginLeft="0dip"
      android:layout_marginRight="0dip"
      android:layout_gravity="center_vertical"
      android:src="@drawable/messageunselected" /&gt;
  
     &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Listview:</p>
  
  <pre><code>   &lt;ListView 
  android:id="@+id/android:list"
  android:fastScrollEnabled="true" 
  android:listSelector="@drawable/listitem_background" 
  android:layout_height="wrap_content" 
  android:layout_width="fill_parent"&gt;&lt;/ListView&gt;
  </code></pre>