One possible solution is arranging your RelativeLayout like this: <RelativeLayout android:id="@+id/ButtonBar" android:layout_height="60dip" android:layout_alignParentBottom="true" ... > ... </RelativeLayout> <ScrollView android:layout_above="@+id/ButtonBar" ... > ... </ScrollView>
Notice the layout_above attribute. Placing the scrollview below the buttonbar in xml is necessary because it references the other component (and layout is done in 1 pass). It's not very convenient, but for a simple layout like this one, it will do. Also, I'm pretty sure you'll want to use dip (instead of px) in this layout once you run it on WVGA device On Mar 8, 10:20 pm, Eelco <eelcoaart...@gmail.com> wrote: > I want a scrollable table on my screen, and beneath that table some > buttons, always visible. But default, the table is overlapping/going > underneath the buttonbar. I tried several things: played with > layout_height which worked, but only when the application refreshed > the screen, not when the application started and showed its startup > screen with data. > > The only way I got it working is using a marginBottom with the same > height as the button bar. Is there any other way, because this > solution seems a bit clumsy i.m.o. > > thanks, > Eelco > > <?xml version="1.0" encoding="utf-8"?> > > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > > > > <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" > android:id="@+id/widget54" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:layout_marginBottom="60px" > > > > <TableLayout > android:layout_width="fill_parent" > android:layout_height="fill_parent" > > > <TableRow> > <TextView android:text="blabla" android:padding="5px"></ > TextView> > <TextView android:text="blabla" android:padding="5px"></ > TextView> > <TextView android:text="blabla" android:padding="5px"></ > TextView> > </TableRow> > > ----- repeat to fill the screen > </TableLayout> > > </ScrollView> > > <RelativeLayout > android:id="@+id/ButtonBar" > android:layout_width="wrap_content" > android:layout_height="60px" > android:layout_alignParentBottom="true" > > > > <Button > android:drawableTop="@android:drawable/ic_menu_rotate" > android:id="@+id/RefreshButton" > android:text="Refresh" > android:layout_width="wrap_content" > android:layout_height="fill_parent" > android:layout_alignParentLeft="true" > ></Button> > </RelativeLayout> > > </RelativeLayout> -- 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