title: Android List Item: TextView on left, Image on right
body: <p>I'm creating a custom list item in and android list view. it's very simple, it has a textview on the left and an image on the right. the image should align all the way right, and the text view should take up all the space on the left. problem is, i can get the image to show up, but it pushes left. if i set the textview width to fill_parent, the image disappears. here's my layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" 
                android:layout_width="fill_parent" android:layout_height="50px" android:layout_gravity="center_vertical"&gt;
    &lt;!-- item --&gt;
    &lt;TextView android:id="@+id/txtItem" android:gravity="center_vertical" android:textSize="20px" android:layout_width="fill_parent" 
              android:layout_height="fill_parent"/&gt;
  
    &lt;!-- disclosure image --&gt;
    &lt;ImageView android:layout_gravity="right|center_vertical" android:src="@drawable/common_icon_arrow_disclosure" 
                android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>i've also tried a relative layout, but the same thing happens. what am i doing wrong?</p>
  
  <hr>
  
  <p>EDIT: for clarification, this is what i'm trying to accomplish:</p>
  
  <p><img src="https://i.stack.imgur.com/yh4LL.png" alt="alt text"></p>
  
  <p>i want the text field to take up the whole left area, and the image to be on the right, unscaled, vertically centered.</p>