Skip to content

FlexboxLayoutManager does not recycle views with Navgraph #628

Open
@ShahidAnjum

Description

@ShahidAnjum

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions