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

RecycleView nests RecycleView, and the internal RecycleView uses FlexboxLayoutManager(context, FlexDirection.ROW, FlexWrap.WRAP), when the number of items is large, it cannot be displayed completely (for example, only 30 items are displayed for 50 items, and they are not displayed after exceeding one screen) #612

Open
wkp91 opened this issue Oct 25, 2022 · 4 comments

Comments

@wkp91
Copy link

wkp91 commented Oct 25, 2022

Problem and steps to reproduce

RecycleView nests RecycleView, and the internal RecycleView uses FlexboxLayoutManager(context, FlexDirection.ROW, FlexWrap.WRAP), when the number of items is large, it cannot be displayed completely (for example, only 30 items are displayed for 50 items, and they are not displayed after exceeding one screen)。

But when FlexboxLayoutManager is set to FlexDirection.COLUMN. Vertical display can all be displayed, and LinearLayoutManager or GridLayoutManager can also be used to display all

Only when FlexboxLayoutManager is set to FlexDirection.ROW is not fully displayed

Version of the flexbox library
3.0.0 and earlier

@xinnuo
Copy link

xinnuo commented Mar 29, 2023

I have the same problem,Is there a solution?

@crayon-monster
Copy link

Same problem here, when the layout manager is changed, all items are visible again

@luojt
Copy link

luojt commented Jun 19, 2023

Find FlexBoxHelper.java

if (sumCrossSize > needsCalcAmount && reachedToIndex) {
    // Stop the calculation if the sum of cross size calculated reached to the point
    // beyond the needsCalcAmount value to avoid unneeded calculation in a
    // RecyclerView.
    // To be precise, the decoration length may be added to the sumCrossSize,
    // but we omit adding the decoration length because even without the decorator
    // length, it's guaranteed that calculation is done at least beyond the
    // needsCalcAmount
    break;
}

Then comment out the If branch code above

if (sumCrossSize > needsCalcAmount && reachedToIndex) {
    // Stop the calculation if the sum of cross size calculated reached to the point
    // beyond the needsCalcAmount value to avoid unneeded calculation in a
    // RecyclerView.
    // To be precise, the decoration length may be added to the sumCrossSize,
    // but we omit adding the decoration length because even without the decorator
    // length, it's guaranteed that calculation is done at least beyond the
    // needsCalcAmount
    // break;
}

@GowsalyaSubramanian0297

Having same problem , Is there any solution?

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

5 participants