0
Considering the following structure:
Listview (1) > Adapter (1) > Listview (2) > Adapter (2)
I need to place a listview inside an Adapter, and in that list view there may be several other Adapters.
Adapter(1) inside Listview(1) needs to contain a Listview(2) and within that precise list of Adapters(2) with heights according to its contents.
I’ve tried everything I’ve seen in tutorials and nothing helped, always the same thing happens. Adapter(1) is fixed in size, and Listview(2) creates scrolling, it is not full in height to readjust the Adapter(1).
I leave below an image with example and caption, and thank you if someone can tell me how I can be making this list. Thank you.
Hello Leandro, perfect understood the logic but my Adapter(1) is picking 100% of the screen, it is not getting proportional to listview
– Hiago Souza
You leave content with wrapcontent?
– Hiago Souza
This, you can leave the height in wrap_content, this method will set the height for you, just remember to call it after the listview is populated.
– Leonardo Dias
call him after lstView.setAdapter(Adapter);
– Hiago Souza
lstView is my listview 2
– Hiago Souza