Skip to content

RecyclerView used in Home Tab does not retain its last scrolled position #2

@kaushiknsanji

Description

@kaushiknsanji

Whenever the user rotates the device, RecyclerView should ideally restore the last scrolled position. This currently is not working properly in the Home Tab screen. Sometimes it does work, and sometimes it does not. When the device is rotated while viewing an Item that is small enough on the screen size, it mostly restores correctly, but it fails when the Item seen is large enough for the screen size. This causes a jump when the last scrolled position is being restored.

From RecyclerView version 1.2, it is said that it internally uses stateRestorationPolicy on the Adapter for this usecase. For the Home Tab screen RecyclerView, this is left at the default setting of ALLOW which should ideally work. Like I stated earlier, it works in certain cases while it fails in other cases. Have tested with other available stateRestorationPolicy settings, and it behaves the same way.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions