title: How to align a TextView to the right with LinearLayout
body: <p>I have two textView objects that I am using to display the result of the calculations in my app.  They are showing up to the right of the TextView so I wanted to know if there is a way through the xml file to position the TextView to the right.  This is my xml code:  </p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:orientation="vertical"
      tools:context="com.jtryon.rectanglecalc.MainActivity$PlaceholderFragment" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="@string/width_string"
              android:textSize="16sp"
              android:textStyle="bold" /&gt;
  
          &lt;EditText
              android:id="@+id/width_edit"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"      
              android:inputType="numberDecimal" &gt; 
  
          &lt;requestFocus /&gt;
          &lt;/EditText&gt;       
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;  
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:text="@string/height_string"
          android:textSize="16sp"
          android:textStyle="bold" /&gt; 
  
      &lt;EditText
          android:id="@+id/height_edit"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:inputType="numberDecimal" /&gt;     
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="16sp"
              android:textStyle="bold" 
              android:text="@string/area_string" /&gt;
  
          &lt;TextView
              android:id="@+id/area_value"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="20sp" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:id="@+id/perim_string"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="16sp"
              android:textStyle="bold"
              android:text="@string/perim_string" /&gt;
  
  
          &lt;TextView
              android:id="@+id/perim_value"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="20sp" /&gt;
  
          &lt;/LinearLayout&gt;    
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/POZP6.png" alt="How it should look"></p>