title: Right aligning text in android?
body: <p>Is there anything special I need to do to get text right aligned in a <code>&lt;TableLayout&gt;</code>?</p>
  
  <p>The following simple example seems to align the text right-edged on the center of the screen, almost as if <code>layout_span</code> had no effect.</p>
  
  <pre><code>&lt;TableLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_height="fill_parent"
          android:layout_width="fill_parent"
          &gt;
      &lt;TableRow&gt;
          &lt;TextView
                  android:text="Some text"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="right"
                  android:layout_span="2"
                  /&gt;
      &lt;/TableRow&gt;
      &lt;TableRow&gt;
          &lt;Button
                  android:text="Button 1"
                  android:layout_weight="50"/&gt;
          &lt;Button
                  android:text="Button 2"
                  android:layout_weight="50"/&gt;
      &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  </code></pre>