Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll position reset after onDetachedFromWindow and recycleChildrenOnDetach == true #1242

Open
eygraber opened this issue Oct 5, 2021 · 1 comment

Comments

@eygraber
Copy link

eygraber commented Oct 5, 2021

Following the wiki guidance on avoiding memory leak I have been setting LayoutManager.recycleChildrenOnDetach = true for all of my EpoxyRecyclerViews.

I'm using one in a ViewPager now, and when scrolling away from the EpoxyRecyclerView and then coming back to it, my scroll position is lost. If I don't set recycleChildrenOnDetach = true then my scroll position is not lost.

Is there any way around this?

@elihart
Copy link
Contributor

elihart commented Nov 20, 2021

i'm guessing you're not saving and restoring view state to your recyclerview correctly, since that is what controls scroll position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants