Note that there are some explanatory texts on larger screens.

plurals
  1. POHeader, Content & Footer in RelativeLayout without alignParentBottom="true"
    primarykey
    data
    text
    <p>I have the following setup to get a layout with header and footer. Since the activity is displayed in a dialog, i want to set the height of the top element to "wrap_content". Regarding to the android docs this not possible as long as you set alignParentBottm="true" to a child element. </p> <p>In an other question someone proposed to use a LinearLayout and set the maxHeight programmatically. Are there any other ways to avoid alignParentBottom="true" ?</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"&gt; &lt;LinearLayout android:id="@+id/LNL_TOP" android:layout_width="match_parent" android:layout_height="60dip" android:layout_alignParentTop="true"&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/LNL_BOTTOM" android:layout_width="match_parent" android:layout_height="60dip" android:layout_alignParentBottom="true"&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/LNL_CONTENT" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/LNL_TOP" android:layout_above="@+id/LNL_BOTTOM"&gt; &lt;ListView android:layout_width="match_parent" android:layout_height="wrap_content"/&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Here is an image of what it currently looks like, I want the layout to wrap the content and avoid the empty space under the list.</p> <p><img src="https://i.stack.imgur.com/Gp1Q.png" alt="enter image description here"></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