If you want a ListView to expand completely and you want it to not have scrollbars, then you dont' want a ListView. ListView and ScrollView cannot be used embedded within one another since they compete for scrolling.
On Fri, Dec 4, 2009 at 9:41 AM, Dustin <dustin.bre...@gmail.com> wrote: > I have a layout that needs to scroll off the screen because it > contains a lot of fields. The top 1/2 of the screen will contain > fixed-width and fixed-height TextViews. However, the bottom 1/2 will > contain two dynamically-sized widgets; a TextView and a ListView. The > bottom TextView may be 1 line of text, or it may contain 15 lines of > text. > > However, the bottom ListView may end up with no space left over, those > making it too tiny to even be useful. What I would really like to do > is have the entire ListView be expanded and the entire layout scroll > up or down. > > I can't seem to accomplish this, even wrapping the entire layout in a > ScrollView. Seems the ScrollView doesn't ever add scrollbars and the > ListView is limited to just whatever is left over in the layout after > the top elements have been drawn. > > Is there a way to request that the ListView be expanded completely and > NEVER have any scrollbars at all, so that the enclosing ScrollView > will handle the scrolling? > > Here's a mock-up of my current layout: > > <ScrollView android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:background="#FFFFFFFF" android:padding="5dp" > android:scrollbars="vertical" android:fillViewport="true" > android:isScrollContainer="true" > <RelativeView...(also tried LinearLayouts, too..) layout_height="both > fill and wrap"> > ... > several text views, layout_height="wrap_content" > ... > > <TextView android:id="@+id/varying_size_tv" > android:layout_height="wrap_content".../> > > <!-- the following ListView always is displayed in the remaining space > UNLESS I specify layout_height="1200dp", then it is expanded and the > ScrollView seems to work --> > <ListView android:id="@android:id/list" > android:layout_width="fill_parent" > android:layout_height="wrap_content" android:minHeight="500dp" > android:layout_below="@id/line" > /> > > </RelativeView> > </ScrollView> > > -- > 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