alexanderblom alexanderblom - 1 year ago 83
Android Question

android:layout_alignParentBottom is ignored when used without explicit layout height as a row in ListView

When I use a

with either
as height and an element which specifies:
it is ignored and it is aligned at the top. Setting the height of the
to an explicit value makes it work. Any clues?

Answer Source

This seems to be a bug in Android itself, see

I worked around it by wrapping my RelativeLayout in a FrameLayout and putting my bottom aligned view as a children of the FrameLayout with android:layout_gravity="bottom". This hinders you from referencing it from within the RelativeLayout so you'll have to work around that (for example using margins).

If anyone has a better workaround, please share.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download