Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one page which needs to be display two list view vertically . .i have added two listview inside scroll view to see all the details . .but the listview fixed its height and the data displayin gets wrapped.for ex : one list has 200 values and other having 100 . . .i need to display all the datas fully without wrapping in a single screen
Posted

1 solution

You can do your xml code like this:
XML
<RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:orientation="vertical"
  android:layout_height="fill_parent"
  >
    <ListView android:id="@+id/ListView01" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        />
    <ListView android:id="@+id/ListView02" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"
        android:layout_below="@+id/ListView01"
        android:gravity="center_horizontal"
        />
</RelativeLayout>

Also gather ideas from these:
How to use multiple listviews in a single activity on android? - Stack Overflow[^]
android - How to use Two ListView in one screen? - Stack Overflow[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900