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

Reply via email to