title: How to center buttons on screen horizontally and vertically plus equidistant apart?
body: <p>I've been racking my brain (android newbie here, so not hard to do) for awhile trying to figure out how to accomplish this: </p>
  
  <p><img src="https://i.stack.imgur.com/6sWvb.jpg" alt="enter image description here"></p>
  
  <p>using a RelativeLayout or something other than AbsoluteLayout which is what this was created with.  I'm coming from a Windows programming background where the device adjusts the 'absolute' positioning for you and GUI layout was a non-issue.</p>
  
  <p>The first layout works great in the emulator, but doesn't format for my Nexus One or any other screen that differs from the emulator size.  I expected this because it's absolutely positioned, but haven't found a solution that will format correctly for different screen sizes.  My goal is to have the layout work for different screen sizes and in portrait / landscape. </p>
  
  <p>Here's the Code that I'm currently using:  [main.xml]</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;AbsoluteLayout 
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  &gt;
    &lt;Button
      android:id="@+id/Button01"
      android:layout_width="188px"
      android:layout_height="100px"
      android:text="A"
      android:layout_y="50px" android:layout_x="65px" android:textSize="48sp"/&gt;
  
  &lt;Button
      android:id="@+id/Button02"
      android:layout_width="188px"
      android:layout_height="100px"
      android:text="B"
      android:layout_y="175px" android:layout_x="65px" android:textSize="48sp"/&gt;
  
  &lt;Button
      android:id="@+id/Button03"
      android:layout_width="188px"
      android:layout_height="100px"
      android:text="C"
      android:layout_y="300px" android:layout_x="65px" android:textSize="48sp"/&gt;
  &lt;/AbsoluteLayout&gt;
  </code></pre>
  
  <p>Using tidbits from other questions here, I came up with this, it’s closer, but not there yet.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TableLayout
  android:gravity="center"
  android:id="@+id/widget49"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical"
  xmlns:android="http://schemas.android.com/apk/res/android"
  &gt;
  &lt;Button
      android:id="@+id/Button01"
      android:layout_width="0dip"
      android:layout_weight="1"
      android:text="A"
      android:textSize="48sp"/&gt;
  
  &lt;Button
      android:id="@+id/Button02"
      android:layout_width="0dip"        
      android:layout_weight="1"
      android:text="B"
      android:textSize="48sp"/&gt;
  
  &lt;Button
      android:id="@+id/Button03"
      android:layout_width="0dip"      
      android:layout_weight="1"
      android:text="C"
      android:textSize="48sp"/&gt;
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>Here’s a picture of the TableLayout:</p>
  
  <p><img src="https://i.stack.imgur.com/kLohG.jpg" alt="enter image description here"></p>
  
  <p>Any help / guidance would be greatly appreciated.   </p>