Preserve RecyclerView Scroll Position
Budget / Salary₹600–1,500
TypeFreelance project
LocationRemote
Posted1 hour ago
I have a RecyclerView driven by a LinearLayoutManager. Card taps are currently picked up through an OnPress handler, and I already keep the underlying data in a ViewModel.
The problem is simple: when a user opens a detail screen from any card and then presses the back button, the list always jumps back to the very top instead of revealing the card they originally tapped. I need the list to remember its exact scroll position so that returning feels seamless.
You’re free to solve it however you feel is cleanest—saving and restoring the layout manager state, using the Navigation component’s back-stack handling, or any other proven method—as long as:
• the previous scroll position is restored every time,
• orientation changes don’t break the fix, and
• no noticeable performance hit is introduced.
Once the change is in place, I’d like a concise note explaining what you modified and why, so the solution stays maintainable.
The problem is simple: when a user opens a detail screen from any card and then presses the back button, the list always jumps back to the very top instead of revealing the card they originally tapped. I need the list to remember its exact scroll position so that returning feels seamless.
You’re free to solve it however you feel is cleanest—saving and restoring the layout manager state, using the Navigation component’s back-stack handling, or any other proven method—as long as:
• the previous scroll position is restored every time,
• orientation changes don’t break the fix, and
• no noticeable performance hit is introduced.
Once the change is in place, I’d like a concise note explaining what you modified and why, so the solution stays maintainable.
Apply on Freelancer →
Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.