I'm displaying a ListView with a view containing a button anchored at
the bottom of the screen below it.  Whether I use fill_parent or
wrap_content for the height of the ListView, it still extends down
behind the 'footer' at the bottom of the screen (which makes sense,
thinking about what they mean).

I was thinking I could programatically use getHeight() against the
'footer', and then set the height of the ListView after getting the
screen height and doing the math.  I don't see how to programatically
set that ListView height after the layout has inflated.

Any pointers?  Layout is below.

Thanks!
dds

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<ListView xmlns:android="http://schemas.android.com/apk/res/android";
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
</ListView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="50sp"
android:layout_alignParentBottom="true"
android:background="#676767"
android:orientation="vertical"
>
        <Button xmlns:android="http://schemas.android.com/apk/res/android";
        android:id="@+id/closebutton"
        android:layout_width="120sp"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        android:text="@string/ui_contact_list_close_str"
        />
</RelativeLayout>
</RelativeLayout>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to