title: How to make textview "grow" from right?
body: <p>I'd like to create a message-like UI. I'm creating a list view with two types of rows: left and right.</p>
  
  <p>Each row contains one TextView. The left one is used to display the message from the sender, while the right one is used to display the message from the current user.  </p>
  
  <p>What I would like to do is to set the TextView in the right row to occupy certain percentage of the screen, have text aligned to the left but to grow dynamically with the content.  </p>
  
  <p>To clarify, here is an image of what I would like to achieve: <a href="http://dl.dropbox.com/u/2482095/wanted.png" rel="nofollow noreferrer">http://dl.dropbox.com/u/2482095/wanted.png</a>    </p>
  
  <p>Blue rows are "left" rows, black rows are "right" rows.  </p>
  
  <p>To achieve this, I have used various combinations of LinearLayout and RelativeLayout with an empty view placed to the left, and desired textView placed to the right. What I get I something like this, which is not what I want: <a href="http://dl.dropbox.com/u/2482095/notWanted1.png" rel="nofollow noreferrer">http://dl.dropbox.com/u/2482095/notWanted1.png</a>    (text always starting at the exact point)    </p>
  
  <p>I have also managed to set gravity:right, which aligns text to the right, which is also not what I wanted.    </p>
  
  <p>Is there any way to make TextView grow with its content?</p>
  
  <p>[edit] My xml file looks something like this:  </p>
  
  <pre><code>    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="5dp"&gt;
          &lt;View android:id="@+id/emptyView"
             android:layout_width="80dp"
             android:layout_height="wrap_content"
             android:layout_weight="1" /&gt;
          &lt;TextView android:id="@+id/messageBody"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content" /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>