h6ah4i / android-advancedrecyclerview

RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)
https://advancedrecyclerview.h6ah4i.com/
Apache License 2.0
5.32k stars 860 forks source link

Saving positions when closing app #443

Open diegomarchetti opened 6 years ago

diegomarchetti commented 6 years ago

Hello, I'm working on a project that will use this awesome expandable+draggable+swipeable recyclerview. Just one quick question. Is there a way to save the positions (both of the sections and the items inside each sections) of the items when closing the app or when changing to a new activity, so once back the positions will be as the last time ordered? Thanks slot, Diego

egek92 commented 6 years ago

use shared preferences to save toPosition and then handle the order onCreate

GrandeSamarone commented 5 years ago

have an example? i want to save the images according to firebase position