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

Is it possible we can have addSection by index? #154

Closed yccheok closed 5 years ago

yccheok commented 5 years ago

I was wondering, is it possible to have addSection by index feature?

The use case is following

// Initialization
adapter.addSection(paddingSection);
adapter.addSection(paddingSection);

...

// In the middle of execution, I would like to have noteSection between the 2 paddingSection
adapter.addSection(1, noteSection);

Is this feature request feasible?

Thanks.

luizgrp commented 5 years ago

This relates to #152: we would have to change the the type of sections from LinkedHashMap to something like ListOrderedMap from apache commons and see if it doesn't break any other functionality.