luizgrp / SectionedRecyclerViewAdapter

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
MIT License
1.68k stars 372 forks source link

how to reuse same viewholder in different section #155

Closed scau-beyondboy closed 3 years ago

scau-beyondboy commented 5 years ago

hi,i think add many the same sections by SectionedRecyclerViewAdapter, but i found it is easy to cause memory surge. i look check the souce code of this library, i found it didn't really reuse the same viewholder in different sections,because it returns different value for each item by getItemViewType(). so if i want to resue same viewholder in different section, how can i do that?

luizgrp commented 5 years ago

Hey, at the moment there is no way of doing that, but I'm happy to discuss how to improve it if anyone is interested in implement it.