MultiViewAdapter icon indicating copy to clipboard operation
MultiViewAdapter copied to clipboard

Repeating menu groups in a single list

Open indoomni opened this issue 7 years ago • 1 comments

Hello. Been using your library since yesterday, and it has been wonderful. Thanks for the effort.

Having a question here.. how do I build such a list:


header a item a1 item a2

header b item b1 item b2

where basically header a and b are the same object type, and items a1, a2, b1 and b2 are also the same type.

If in the adapter I have two list managers (say, headers and items), then headers will grouped at the top, and all of the items will be grouped below.

Maybe this is just a stupid question, but really appreciate any help. Thanks beforehand.

indoomni avatar Oct 10 '18 02:10 indoomni

This can be achieved by two ways.

  1. You can add it like,

    --DataItemManager (1 item) --DataListManager (multiple items) --DataItemManger (1 item) --DataListManager (multiple items)

  2. Using DataGroupManager. Kindly take a look into this wiki page - https://github.com/DevAhamed/MultiViewAdapter/wiki/Expandable-Group Only caveat here is you need to set the group expansion policy as multiple and set all the groups as expanded by default.

DevAhamed avatar Oct 10 '18 07:10 DevAhamed