title: Android 2x2 buttons: same size when the content is different
body: <p>I have an <code>Activity</code> with an <code>Image</code> and a 2x2 button bar (<code>TableLayout</code>). I want it to be like this:</p>
  
  <p><img src="https://i.stack.imgur.com/uu7mK.png" alt="enter image description here"></p>
  
  <p>The <code>TableLayout</code> with the buttons will fill all the space left by the image. I want all the buttons to have the same size (height and width). Right now I'm using this code:</p>
  
  <pre><code> &lt;ImageView
          android:id="@+id/myImage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="30dp" /&gt;
  
      &lt;TableLayout
          android:id="@+id/buttonBar"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_below="@+id/myImage"
          android:stretchColumns="*" &gt;
  
          &lt;TableRow
              android:id="@+id/tr1"
              android:layout_width="match_parent"
              android:layout_height="0dip"
              android:layout_weight="1" &gt;
  
              &lt;Button
                  android:id="@+id/button1"
                  android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:onClick="Clicked" /&gt;
  
              &lt;Button
                  android:id="@+id/button2"
                  android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:onClick="Clicked" /&gt;
          &lt;/TableRow&gt;
  
          &lt;TableRow
              android:id="@+id/tr2"
              android:layout_width="match_parent"
              android:layout_height="0dip"
              android:layout_weight="1" &gt;
  
              &lt;Button
                  android:id="@+id/button3"
                  android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:onClick="Clicked" /&gt;
  
              &lt;Button
                  android:id="@+id/button4"
                  android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:onClick="Clicked" /&gt;
          &lt;/TableRow&gt;
      &lt;/TableLayout&gt;
  </code></pre>
  
  <p>This works if the <code>Buttons</code> have the same content, but if the first Button has 1 line of text and the last one has 2 lines then the second row's height is higher than the first one. How can I fix it?</p>
  
  <p>I tried adding  android:layout_weight="1"  in all the Buttons, but it's still not working.</p>
  
  <p>Thanks!</p>