I added a listview A as the head view of another listview B. Then I found the display of A is abnormal, the height of A is not large enough to show the list items.
Their layout file is:
<ListView
android:id="@+id/MyListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:cacheColorHint="@null"
android:divider="@drawable/mydivider" />
Anybody know how to solve it?
You cannot put a
ListViewinside anotherListView.If your objective is to have a single list containing the contents of multiple adapters, consider using my
MergeAdapter. Or, since your one comment suggests that you have twoCursors, consider using aMergeCursorwith a singleCursorAdapter.