airbnb / epoxy

Epoxy is an Android library for building complex screens in a RecyclerView
https://goo.gl/eIK82p
Apache License 2.0
8.51k stars 728 forks source link

saveInstanceState for PagedListEpoxyController? #1246

Closed blah1234 closed 2 years ago

blah1234 commented 2 years ago

Do onSaveInstanceState(@NonNull Bundle outState) and onRestoreInstanceState(@Nullable Bundle inState) work for PagedListEpoxyController?

I am able to successfully save and restore scroll state of my RecyclerViews when I use TypedEpoxyControllers, but using the same pattern for a RecyclerView with PagedListEpoxyController doesn't seem to save and restore the scroll position/state when I navigate away and return to the fragment hosting the RecyclerView.

blah1234 commented 2 years ago

I found the solution to my own problem. Documenting here if anyone else runs into this problem...