开发者

i want to display this listview on scrolling

开发者 https://www.devze.com 2022-12-24 10:21 出处:网络
开发者_运维知识库I\'m completely stumped on this one. I have three different lists that need to be displayed on the screen.
开发者_运维知识库

I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the ListViews lock to a fixed height with scroll bars. Using other kinds of Layouts means no scrolling.


The height of the listviews in your linearlayout are dependant on how you weight them.

Do you have some sample code?

Try this layout (not tested)

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="fill_parent"
android:height="fill_parent"
android:orientation="vertical"
>

<ListView
android:id="@+id/list1"
android:width="fill_parent"
android:height="fill_parent"
android:layout_weight="1"
>

<ListView
android:id="@+id/list2"
android:width="fill_parent"
android:height="fill_parent"
android:layout_weight="1"
>

<ListView
android:id="@+id/list3"
android:width="fill_parent"
android:height="fill_parent"
android:layout_weight="1"
>

</LinearLayout>
0

精彩评论

暂无评论...
验证码 换一张
取 消