Jonas wrote: > Hi. > > The foooter for this list view goes out of scope. The header is fixed > but I like the footer also to > be fixed, thus scrolling the list between the header and footer. Cant > get this to work below is my xml: > > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="wrap_content"> > > <TextView android:id="@+id/view" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > android:text="Header:"/> > > <LinearLayout > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="wrap_content"> > > <ListView android:id="@+id/android:list" > > android:layout_width="fill_parent" > > android:layout_height="wrap_content"/> > > <TextView android:id="@+id/android:empty" > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > android:textSize="20sp" > android:text="No > data!"/> > > </LinearLayout> > > <TextView android:id="@+id/summary" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > android:text="Footer:"/> > > </LinearLayout>
Set your middle LinearLayout's layout_height to 0px and layout_weight to 1. That will cause it to take up all extra space that your header and footer do not use. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---