Line layout with nested scroll list

I have a LinearLayout with a nested list that looks like this:

<LinearLayout ... >
    <LinearLayout>
    </LinearLayout>
    <ListView>
    </ListView>
</LinearLayout>

The problem is that listview owns the scrollbar (so that only the content in listview scrolls), but I really want the parent LinearLayout to own the scrollbar (so that all the content scrolls).

Wrapping the parent ListView in ScrollView was not successful because ScrollView does not recognize the height of the ListView (which looks like it is displayed at run time)

thank

Edit: SOLVED My ideal solution was to use the MergeAdapter as advised by Barak

+3
source share
3

CommonWares MergeAdapter, , MergeAdapter , , , .

MergeAdapter, ,

+2

Listview TableView, . childview , listview, , , listview, .

0

listview , , , ( ), , , , , .

, listview, , , , .

Listview

, , .

It depends only on the use case (the number of elements in the list view, memory problems, etc.) and what is the purpose of the other views.

0
source

All Articles