Note that there are some explanatory texts on larger screens.

plurals
  1. POAligning Controls
    primarykey
    data
    text
    <p>I'm just wasting time with this, because I have no idea how to do it properly. Basically, I want to have a custom input view, where the user can draw whatever he wants with his / her finger and, below it, I want to place 2 (or maybe more) buttons, which I don't want to overlap on top of the custom view. Because I'm trying to avoid hardcoding widths and heights, is there any way to specify that the buttons should wrap to their contents and the custom view should occupy the remaining height? Since I expect all buttons to have the same height, I guess that taking the height of one of them as a reference should work somehow...</p> <p>Here's my current layout:</p> <pre><code>&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" tools:context=".MainActivity" &gt; &lt;com.example.myapp.DrawView android:id="@+id/drawView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" /&gt; &lt;Button android:id="@+id/buttonSave" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:text="@string/save" /&gt; &lt;Button android:id="@+id/buttonQuery" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:text="@string/query" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Is it actually possible to achieve what I want easily, without having to hack it in nasty ways?</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.
 

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