Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There may be better ways of doing this, I actually haven't used TableLayout before, but the XML below gives the basic layout that you asked for:</p> <pre><code> &lt;TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;TableRow android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_span="4" android:layout_weight="1" android:text="Text" android:gravity="center" /&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.25" android:text="Text" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_span="3" android:layout_weight="0.75" android:text="Text that is longer than other cells" /&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.25" android:text="Text" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.25" android:text="Text" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.25" android:text="Text" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.25" android:text="Text" /&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; </code></pre>
 

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