Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't think it is possible to do that with a <code>TableLayout</code>. But you can definitely do that with a <code>RelativeLayout</code></p> <p>A quick conversion from your code to <code>RelativeLayout</code>:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;TextView android:id="@+id/textview_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_margin="2dp" android:background="@drawable/transparent_btn" android:gravity="center" android:text="@string/title_number" android:textColor="@color/white" /&gt; &lt;Button android:id="@+id/buttonXY" android:layout_width="100dp" android:layout_height="60dp" android:layout_alignParentLeft="true" android:layout_below="@+id/textview_title" android:layout_margin="2dp" android:background="@drawable/transparent_btn" android:text="XY button" /&gt; &lt;TextView android:id="@+id/text_description" android:layout_width="wrap_content" android:layout_height="30dp" android:layout_alignParentRight="true" android:layout_alignTop="@+id/buttonXY" android:layout_margin="2dp" android:layout_toRightOf="@+id/buttonXY" android:background="@drawable/white_dot_btn" android:gravity="top" android:onClick="button_start_click" android:text="abc" android:textColor="@color/white" /&gt; &lt;Button android:id="@+id/button_back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/text_description" android:layout_below="@+id/text_description" android:layout_margin="2dp" android:background="@drawable/white_btn" android:onClick="button_back_click" android:text="quit" /&gt; &lt;Button android:id="@+id/button_start" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/buttonXY" android:layout_alignParentRight="true" android:layout_margin="2dp" android:layout_toRightOf="@+id/button_back" android:background="@drawable/green_btn" android:onClick="button_start_click" android:text="start" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>The only downside with this, is that the width cannot be that dynamic anymore. But there are probably some other tricks that can be used to solve this problem. I leave this to your own inspiration</p>
 

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