Recycler View introduces a new API to let the Adapter block layout restoration until it is ready. Most of the developers facing the problem of restore the recycler view position when view recreated (on rotation). But Finally Android come up with StateRestorationPolicy to solve this problem. Let's get hands dirty on it and share knowledge.
To get better understanding and coding part, Please go through YouTube link for demo app and Medium link for coding part: Demo App : https://youtu.be/5syrnl9EDW0, Medium Link : https://swatiomar09.medium.com/restore-recycler-view-state-2d5bb6a3eb6a
Happy Coding :)