解决方法
您可以通过向每个滚动视图添加属性
android:weight来轻松地安排此操作.
这样做的诀窍:
<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> <ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"> <TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Lorem ipsum dolor sit amet,consectetur adipiscing elit. In auctor varius ligula quis imperdiet. Cras at arcu eget ligula lacinia aliquam. Donec ultricies neque eu nisl elementum sed luctus leo porta. Nunc gravida molestie sodales. Nam sit amet lacus a odio dictum dignissim. Pellentesque nec tincidunt urna. Praesent mattis dignissim ante,eu placerat leo placerat vel. Curabitur nec consequat nisl. Donec dapibus ante id enim faucibus ut scelerisque risus sollicitudin. Vestibulum ipsum sapien,molestie vel dignissim eleifend,ultricies vitae libero. Nullam sapien libero,posuere non ornare sed,tristique non nisi. Proin eu nunc sapien,vitae euismod neque. Fusce scelerisque purus sit amet leo accumsan scelerisque varius ligula interdum. Maecenas non mauris vitae lacus vehicula pulvinar sed quis dui. Nullam ultricies mollis tortor vel dictum. Phasellus tincidunt dui id odio sodales tincidunt. Curabitur malesuada dapibus neque,non malesuada augue tempus at. Integer et nulla et arcu sollicitudin semper. "></TextView> </ScrollView> <ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"> <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Lorem ipsum dolor sit amet,non malesuada augue tempus at. Integer et nulla et arcu sollicitudin semper. "></TextView> </ScrollView> <ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"> <TextView android:id="@+id/TextView03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Lorem ipsum dolor sit amet,non malesuada augue tempus at. Integer et nulla et arcu sollicitudin semper. "></TextView> </ScrollView>
alt text http://img341.imageshack.us/img341/7319/scrollviews.png