Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm assuming you want the buttons to fill up the available height on the screen. In that case please look to the answer here <a href="https://stackoverflow.com/questions/11635393/android-tablelayout-height-does-not-fills-the-whole-screen">Android TableLayout height does not fills the whole screen</a></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:orientation="vertical" &gt; &lt;TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" &gt; &lt;TableRow android:layout_height="0dp" android:layout_weight="1" &gt; &lt;Button android:id="@+id/one" android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:text="1" /&gt; &lt;Button android:id="@+id/two" android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:text="2" /&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_height="0dp" android:layout_weight="1" &gt; &lt;Button android:id="@+id/three" android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:text="3" /&gt; &lt;Button android:id="@+id/four" android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:text="4" /&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_height="0dp" android:layout_weight="1" &gt; &lt;Button android:id="@+id/five" android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:text="5" /&gt; &lt;Button android:id="@+id/six" android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:text="6" /&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>Notice that the table rows now have </p> <pre><code> android:layout_height="0dp" android:layout_weight="1" </code></pre> <p>This will allow the row to expand to fill the remaining space (with each row getting 1/3 of the screen height).</p> <p>I also changed the buttons layout width to 0dp, as you are using weight. Also you do not need the <code>xmlns:android="http://schemas.android.com/apk/res/android"</code> 3 times. You only need it on the parent layout.</p> <p>Finally, as many of your buttons are using the same styling. I'd suggest you look at possibly using a style for these buttons. You can learn more about styles / themes at <a href="http://developer.android.com/guide/topics/ui/themes.html" rel="nofollow noreferrer">http://developer.android.com/guide/topics/ui/themes.html</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload