Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I was searching for this a while too. My just found solution is to use the property:</p> <pre><code>android:layout_alignParentBottom="true" </code></pre> <p>instead of your existing <code>android:layout_gravity="bottom"</code></p> <p>This unfortunately with my layout only works when having an additional <strong><code>RelativeLayout</code> as root layout</strong> and the rest added to it. Maybe this is not always the case, but with having a <code>LinearLayout</code> (even when told to use <code>fill_parent</code>) it only used the height all added elements needed and put my footer at the bottom of those.</p> <p>I came to this solution, looking at this related question: <a href="https://stackoverflow.com/questions/3555868/how-do-i-achieve-the-following-result-using-relativelayout">How do I achieve the following result using RelativeLayout?</a></p> <p>EDIT here because format in answer comment got lost: Do you mean you can't re-write it or that it didn't work?</p> <p>I had a vertical LinearLayout too and my new xml structure looks (without the layout size params etc.) sth. like this:</p> <pre><code>&lt;RelativeLayout&gt; &lt;RelativeLayout android:id="@+id/RelativeLayout01"&gt; &lt;/RelativeLayout&gt; &lt;RelativeLayout android:id="@+id/RelativeLayout02" android:layout_below="@+id/RelativeLayout01"&gt; &lt;/RelativeLayout&gt; &lt;RelativeLayout android:layout_below="@+id/RelativeLayout02" android:layout_alignParentBottom="true"&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&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