fill_parent is meaningless inside a ScrollView. What you want is to use wrap_content and add android:fillViewport="true" on the ScrollView.
On Wed, Nov 4, 2009 at 6:45 PM, droid_does <bjkr...@gmail.com> wrote: > > I would like to have a scrollable layout with some buttons at the > bottom. Getting the buttons to the bottom when using a Linear Layout > works, however once I add a ScrollView it doesn't. Below is an > example demonstrating my problem (I know there isn't enough content to > benefit from scrolling) > > <?xml version="1.0" encoding="utf-8"?> > <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:background="#FFFFFF"> > > <LinearLayout > android:orientation="vertical" android:layout_width="fill_parent" > android:layout_height="fill_parent"> > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="@string/hello" /> > > <LinearLayout > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:orientation="horizontal" android:gravity="bottom"> > > <Button > android:text="Something" android:id="@+id/btn2" > android:layout_width="0dip" > android:layout_height="wrap_content" > android:layout_weight="1" /> > > <Button > android:text="Something Else" android:id="@+id/btn1" > android:layout_width="0dip" > android:layout_height="wrap_content" > android:layout_weight="1" /> > > </LinearLayout> > > </LinearLayout> > > </ScrollView> > > Changing the gravity(=bottom) will push the Linear Layout containing > the buttons to the bottom of the outer Linear Layout container, but > that isn't at the bottom of the layout. Why when there is a > ScrollView involved does it prevent layout_height="fill_parent" from > filling the entire layout? > > I found a post on same problem but there were never any answers. > > http://markmail.org/message/ftiyzo7mvr45qv3g > > -- > 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 > -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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