-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
FlexboxLayoutManager does not recycle views with Navgraph #628
Comments
When the list gets too big, the app sometimes crashes and causes ANR. because when you switch the fragments in the navGraph, all the items are created at once. |
I also face this similar issue, please let us know if you find any solution |
Facing the same issue in my case as well. Please look into it. |
@thagikura any idea why this is happening or how it can be fixed? |
I have created a fork and updated the dependencies. The items in the grid uses DataBinding, I made a call to |
Steps to reproduce
1: Create application with Navigation component (NavGraph and BottomNavigationView)
2: Create two fragments for Each tab of BottomNavigationView (HomeFragment & ListFragment)
3: Load items in (ListFragment) recycler view with pagination. Until here, there is no issue because view recycling is carried out correctly with each page's data.
4: Change the tab from ListFragment to HomeFragment, then back to ListFragment. View recycling fails at this point, and all views are created at once. However, the list's scroll state is preserved, which is handled by default when using NavGraph.
Expected behavior
View recycling should work properly even when the tab is switched, and only the list positions that are visible should be rendered. View recycling works perfectly fine when using LinearLayoutManager or GridLayoutManager
Version of the flexbox library
e.g. 3.0.0
Link to code
Github link of the sample project: https://github.com/ShahidAnjum/FlexBoxSample
The text was updated successfully, but these errors were encountered: