Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Embed your GridLayout in LinearLayout as below and try it worked for me.</p> <p><img src="https://i.stack.imgur.com/U0VsJ.png" alt="enter image description here"></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="match_parent" android:layout_height="match_parent" android:orientation="horizontal" &gt; &lt;GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:columnCount="2" &gt; &lt;Button android:layout_column="0" android:layout_columnSpan="1" android:layout_gravity="start|end" android:layout_row="0" android:text="ASDFASDF" /&gt; &lt;Button android:layout_column="1" android:layout_gravity="start|end" android:layout_row="0" android:text="SDAVDFBDFB" /&gt; &lt;Button android:layout_column="0" android:layout_columnSpan="2" android:layout_gravity="fill|center" android:layout_row="1" android:text="ASDVADFBFDAFEW" /&gt; &lt;Button android:layout_column="0" android:layout_columnSpan="1" android:layout_gravity="fill|center" android:layout_row="2" android:text="FWEA AWFWEA" /&gt; &lt;Button android:layout_column="1" android:layout_columnSpan="1" android:layout_gravity="fill" android:layout_row="2" android:text="BERWEfasf" /&gt; &lt;Button android:layout_width="94dp" android:layout_column="0" android:layout_columnSpan="1" android:layout_gravity="fill|center" android:layout_row="3" android:text="SDFVBFAEVSAD" /&gt; &lt;Button android:layout_column="0" android:layout_columnSpan="1" android:layout_gravity="fill|center" android:layout_row="4" android:layout_rowSpan="2" android:text="GVBAERWEFSD" /&gt; &lt;Button android:layout_column="1" android:layout_columnSpan="1" android:layout_gravity="fill|center" android:layout_row="3" android:layout_rowSpan="2" android:text="VSDFAVE SDFASDWA SDFASD" /&gt; &lt;Button android:layout_column="1" android:layout_columnSpan="1" android:layout_gravity="fill|center" android:layout_row="5" android:text="FWEWEGAWEFWAE"/&gt; &lt;/GridLayout&gt; &lt;/LinearLayout&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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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