I have 2 ListViews and each one gets information from the databse site .... everything is going fine, but I want to show the first list and then the second list below it, without setting a fixed height. For example, the user should scroll to the end of the first list, and then show the second list without showing the scroller. here is what i did:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" > <ListView android:id="@+id/firstlist" android:layout_width="wrap_content" android:layout_height="wrap_content" > </ListView> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <ListView android:id="@+id/secondlist" android:layout_width="wrap_content" android:layout_height="wrap_content" > </ListView> </RelativeLayout> </LinearLayout>
but the screen does not appear, even if I continue to scroll, only one list appears (first) ... if I do not give them a fixed height, for example android:layout_height="180dp" any ideas?
source share