title: Android XML: Centering Horizontally On Bottom
body: <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" 
      &gt;
  
  &lt;TextView 
      android:text="Title" 
      android:id="@+id/TextView01" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textSize="30px" 
      android:textStyle="bold" 
      &gt;
  &lt;/TextView&gt;
  
  &lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="60px"&gt;
  
  &lt;Button 
      android:text="Choose a Story" 
      android:id="@+id/choose" 
      android:layout_width="150px" 
      android:layout_height="wrap_content"  
      android:layout_gravity="bottom" 
      android:layout_marginBottom="1px"&gt;
  &lt;/Button&gt;
  
  &lt;Button 
      android:text="Info" 
      android:id="@+id/info" 
      android:layout_width="150px" 
      android:layout_height="wrap_content"  
      android:layout_gravity="bottom" 
      android:layout_marginBottom="1px"&gt;
  &lt;/Button&gt;
  
  &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>In this code, as you can see, there is a title, 2 linear layouts, and 2 buttons that are inside a linear layout. What I'm trying to do is center the 2 buttons. No matter what I do, I can never get the 2 buttons to be centered at the bottom with a height of 60px. </p>
  
  <p>In the end I'm trying to make the text centered both vertically and horizontally, and have the 2 buttons on the bottom centered horizontally. What do I need to change?</p>
  
  <p>Heres a picture of what it looks like in the Layout Editor.
  <img src="https://i.stack.imgur.com/ynjJ5.png" alt="alt text"></p>