title: layout_weight with buttons and text views in table row
body: <p>I am trying to make four rows of three buttons each, and at the bottom of the buttons are two text views. I would like for them all to be spaced evenly but they aren't and I am not sure why.</p>
  
  <p>Here is the code in my <code>main.xml</code> file.</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;TableLayout android:id="@+id/TableLayout01" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
  &lt;TableRow 
  
    android:id="@+id/TableRow01" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"&gt;
  
  &lt;Button android:onClick="button_click" 
    android:layout_weight="1"
    android:id="@+id/Button01" 
    android:text="@string/str_1"/&gt; 
  
  &lt;Button android:onClick="button_click" 
    android:layout_weight="1"
    android:id="@+id/Button02" 
    android:text="@string/str_2"/&gt; 
  
  &lt;Button android:onClick="button_click"
    android:layout_weight="1"
    android:id="@+id/Button03" 
    android:text="@string/str_3"/&gt;
  
  &lt;Button android:onClick="button_click"
    android:layout_weight="1" 
    android:id="@+id/Button04" 
    android:text="@string/str_4"/&gt;
  
  &lt;/TableRow&gt;
  
  &lt;TableRow android:id="@+id/TableRow02" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"&gt;
  
  &lt;Button android:onClick="button_click"
    android:layout_weight="1" 
    android:id="@+id/Button05"  
    android:text="@+string/str_5"/&gt;
  
  &lt;Button android:onClick="button_click"
    android:layout_weight="1"
    android:id="@+id/Button06" 
    android:text="@+string/str_6"/&gt;
  
  &lt;Button android:onClick="button_click" 
    android:layout_weight="1"
    android:id="@+id/Button07" 
    android:text="@+string/str_7"/&gt;
  
  &lt;Button android:onClick="button_click"
    android:layout_weight="1" 
    android:id="@+id/Button08"  
    android:text="@+string/str_8"/&gt;
  
  &lt;/TableRow&gt;
  
  &lt;TableRow android:id="@+id/TableRow03" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"&gt;
  
  &lt;Button android:onClick="button_click" 
    android:layout_weight="1"
    android:id="@+id/Button09" 
    android:text="@+string/str_9"/&gt;
  
  &lt;Button android:onClick="button_click" 
    android:layout_weight="1"
    android:id="@+id/Button10" 
    android:text="@+string/str_10"/&gt;
  
  &lt;Button android:onClick="button_click" 
    android:layout_weight="1"
    android:id="@+id/Button11" 
    android:text="@+string/str_11"/&gt;
  
  &lt;Button android:onClick="button_click" 
    android:layout_weight="1"
    android:id="@+id/Button12" 
    android:text="@+string/str_12"/&gt;
  
  &lt;/TableRow&gt;
  
  &lt;TableRow android:id="@+id/TableRow04" 
      android:layout_width="wrap_content" 
      android:layout_height="fill_parent"&gt;
  
  &lt;TextView android:text="@+id/TextView01" 
      android:layout_weight="1" 
      android:id="@+id/TextView01" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
  
  &lt;TextView android:text="@+id/TextView02"
      android:layout_weight="1" 
      android:id="@+id/TextView02" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
  
  &lt;/TableRow&gt;
  
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>My text views have the following code:</p>
  
  <pre class="lang-xml prettyprint-override"><code> TextView t = (TextView)findViewById(R.id.TextView01);
   TextView t2 = (TextView)findViewById(R.id.TextView02);
   t.setTextSize(24);
   t2.setTextSize(24);
  </code></pre>
  
  <p>When I run my program I get:</p>
  
  <p><a href="https://i.stack.imgur.com/taPES.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/taPES.png" alt="alt text"></a></p>