Closed yccheok closed 4 years ago
Hi @yccheok, I'm afraid I agree with you that this library wouldn't be the best to build that kind of layout. In order to do that efficiently the library would need to support including items that are not sections.
I would recommend you to try Groupie. B and E would be of type ExpandableGroup and the others would be of type Item.
Hi,
I would like to know, is
SectionedRecyclerViewAdapter
a good candidate to implement the following case?https://youtu.be/CdNOw4jyD00
My initial design thought is that
Using SectionedRecyclerViewAdapter
However, such design might be highly inefficient as, you need to dynamically allocate a lot of
Section
, add/ removeSection
during run-time. Most of the time, the number of Section content item will be 0.NOT Using SectionedRecyclerViewAdapter
Another approach I can think of, is treating this
RecyclerView
is only having 1 view type.A single class data structure will used to hold information A, B, B.1, B.2, B.3, C, ...
During
onBindViewHolder
, we will then slightly adjust the UI outlook, based on whether the item is B or B.1Do you have any suggestion what are some other better approaches I can use?
Thank you.