Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this.. give table row <code>width</code> as <code>match_parent</code> and <code>height</code> as <code>wrap_content</code> and remove <code>weight</code>. then if you give <code>weight</code> for something you need to give <code>0dp</code> for particular <code>height</code> or <code>width</code></p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".HomeScreen" &gt; &lt;TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:stretchColumns="*" android:weightSum="4" &gt; &lt;TableRow android:id="@+id/tableRow1" android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;Button android:id="@+id/fBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="fStr" /&gt; &lt;Button android:id="@+id/rBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="rStr" /&gt; &lt;Button android:id="@+id/sBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="sStr" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow2" android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;Button android:id="@+id/cBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="cStr" /&gt; &lt;Button android:id="@+id/aBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="aStr" /&gt; &lt;Button android:id="@+id/lBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="lStr" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow3" android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;Button android:id="@+id/oBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="oStr" /&gt; &lt;Button android:id="@+id/tBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="tStr" /&gt; &lt;Button android:id="@+id/eBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="tStr" /&gt; &lt;/TableRow&gt; &lt;TableRow android:id="@+id/tableRow4" android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;Button android:id="@+id/dBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="tStr" /&gt; &lt;Button android:id="@+id/hBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="tStr" /&gt; &lt;Button android:id="@+id/aaBtn" android:layout_width="0dp" android:layout_height="fill_parent" android:drawableTop="@drawable/ic_launcher" android:layout_weight=".3" android:textAppearance="?android:attr/textAppearanceSmall" android:text="tStr" /&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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. 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