title: Android: Table Layout alignment
body: <p><img src="https://i.stack.imgur.com/jaGuQ.png" alt="enter image description here"></p>
  
  <p>I want 'Duration' and 'Cost' Right aligned. I tried this code but it's not working.</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="vertical" &gt;
  
  &lt;com.markupartist.android.widget.ActionBar
      android:id="@+id/actionBar"
      style="@style/ActionBar" /&gt;
  
  &lt;TableLayout 
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"&gt;
     &lt;TableRow
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"&gt;
         &lt;TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:paddingLeft="5dip"
             android:text="Date" /&gt;
         &lt;TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:paddingLeft="5dip"
             android:text="Couse Name" /&gt;
         &lt;TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:paddingLeft="5dip"
             android:layout_gravity="right"
             android:text="Duration" /&gt;
         &lt;TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:paddingLeft="5dip"
             android:paddingRight="5dip"
             android:layout_gravity="right"
             android:text="Cost" /&gt;
     &lt;/TableRow&gt;       
   &lt;/TableLayout&gt;    
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>layout_gravity="right" not working.
  I trird gravity="ritght" but that's also not working.
  I also want each column to center aligned.</p>