title: Android Layout Text at Left and Image at Right
body: <p>I am trying to to make a list where image stay on the right of the layout all the time. At the same time if there is no image I will like the subject text to fill the whole layout.</p>
  
  <p>This is what I hope to achieve <br>
  When Image is Hide<br>
  <img src="https://i.stack.imgur.com/xGEgS.png" alt="enter image description here">
  <br>With Image<br>
  <img src="https://i.stack.imgur.com/2KhJ0.png" alt="enter image description here"></p>
  
  <p>Current output:<br>
  The image at the front on the text.<br>
  <img src="https://i.stack.imgur.com/iA6jT.png" alt="enter image description here"></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:padding="6dip" android:layout_height="?android:attr/listPreferredItemHeight"&gt;
      &lt;TextView
          android:id="@+id/subject"        
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_alignParentBottom="true"
          android:text="Apple Orange Apple Orange Apple Orange Apple Orange Apple Orange Apple Orange"/&gt;
      &lt;TextView
          android:id="@+id/cdate"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"       
          android:layout_alignParentLeft="true"
          android:layout_alignParentBottom="true" 
          android:textColor="#8000FF"       
          android:text="Date" /&gt;
      &lt;ImageView  
          android:id="@+id/icon"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"      
          android:layout_alignParentRight="true" 
          android:layout_alignRight="@id/subject"
          android:src="@drawable/icon" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>