You can use layout_weight on the scroll view, or... ...you can change your top level layout to Relative and position its children with layout_above, layout_below, layout_alignParentBottom, etc.
-- Kostya Vasilyev 25.10.2011 2:54 пользователь "Mark Phillips" <m...@phillipsmarketing.biz> написал: > I have the following layout: > > LinearLayout - vertical > TableLayout > ScrollView > TableLayout > LinearLayout > > When I fill the TableLayout in the ScrollView with rows, it pushes the > bottom LinearLayout off the screen. How do I get these three layouts to work > together so all three appear on the screen, and I can scroll the center > layout to see all of the table? I only want 6 rows of the table to be > visible. It all fits with room to spare if I only have 6 rows in the table. > > I can make it work if I do this: > > LinearLayout - vertical > TableLayout > LinearLayout - android:layout_height="360dp" > ScrollView > TableLayout > LinearLayout > > Is this the "right" way to handle this problem - specifying a specific > height? Since devices have different screen sizes, do I need some sort of > code to get the screen size and compute this value at the start of the > program? Is there a more "android" way of accomplishing what I want? > > Thanks! > > Mark > > -- > 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 -- 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