Android SDK Align two elements in center
<p>Im trying to align two elements in my xml file.
I want to display a TextView called "Description" and a TextView called "Value" on the same line. The Description should right aligned to the center, the Value should be left aligned the center. But the following gravity doesnt seem to affect them.<br/><br/>
I assume I should avoid using AbsoluteLayout because of different screen sizes.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    android:id="@+id/LinearLayout01"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" &gt;

    &lt;TextView
        android:id="@+id/TextViewDescription"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right"
        android:text="@+id/TextView01" &gt;
    &lt;/TextView&gt;

    &lt;TextView
        android:id="@+id/TextViewValue"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        android:text="@+id/TextView02" &gt;
    &lt;/TextView&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>I also looked at TableLayout but struggled with that too.</p>

<p>What is the correct way to create a set of description/values down the screen that are center aligned so they appear fine on both portrait and landscape view?</p>
