title: Aligning textviews on the left and right edges in Android layout
body: <p>I am getting started with Android. I am having trouble getting a simple layout going.  </p>
  
  <p>I would like to use a <code>LinearLayout</code> to position two <code>TextViews</code> in a single row. One <code>TextView</code> on the left hand side, the other on the right hand side (analogous to float:left, float:right in CSS).</p>
  
  <p>Is that possible, or do I need to use a different <code>ViewGroup</code> or further layout nesting to accomplish it?</p>
  
  <p>Here's what I have so far:</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="horizontal" android:padding="10sp"&gt;
  &lt;TextView android:id="@+id/mytextview1" android:layout_height="wrap_content" android:text="somestringontheleftSomestring" android:layout_width="wrap_content"/&gt;
  &lt;TextView android:id="@+id/mytextview2" android:layout_height="wrap_content" android:ellipsize="end"
      android:text="somestringontheright" android:layout_width="wrap_content"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>