cycler icon indicating copy to clipboard operation
cycler copied to clipboard

Cycler doesn't permit use of StateRestorationPolicy

Open BenTilbrook opened this issue 4 years ago • 0 comments

The library hides the implementation details of the RecyclerView.Adapter usage, making it impossible to assign the RecyclerView.Adapter.StateRestorationPolicy to the adapter. This means we can't resolve state restoration issues the policy is intended to address.

Part of the problem is the adapter is assigned "just-in-time" in com.squareup.cycler.Recycler.update, and there doesn't appear to be any way to hook into this mechanism to modify the adapter prior to assignment.

Is there anything that can be done about this? Can this hack be removed, now that StateRestorationPolicy is available?

BenTilbrook avatar Dec 01 '21 02:12 BenTilbrook