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

LayoutManager: child views are not measured properly when they are not visible #262

Closed
saket opened this issue Apr 16, 2017 · 5 comments
Closed
Labels
Milestone

Comments

@saket
Copy link

saket commented Apr 16, 2017

Hey @thagikura I found a visual bug.

Steps to reproduce:

  • Make changes to a RecyclerView's data-set that are currently not visible.
  • Dispatch the updated dataset to the RV's adapter.
  • Scroll to items that were changed, but were not visible when the change was triggered

Screenshot

bug

AntrixCorporation -> Antri, AskReddit -> Ask, bangalore -> banga, chemicalreactiongifs -> chemi

In my layout, I have an animation that changes the RV's height and this bug gets fixed as soon as the animation is run.

@thagikura thagikura added the bug label Apr 17, 2017
@thagikura
Copy link
Contributor

Thanks for filing this. What part did you to the items that were not visible?
Did you change the texts?

Anyway this looks like an issue.

@saket
Copy link
Author

saket commented Apr 17, 2017

No, I simply inserted a new item.

@thagikura
Copy link
Contributor

thagikura commented Apr 18, 2017

Ok I found the issue.
Non-visible part of the flex container is not computed currently. There needs to be like a dirty flag telling that that part needs to be computed. Then when that part becomes visible, the FlexboxLayoutManager should tell FlexboxHelper to compute the part which has a dirty flag.

@saket
Copy link
Author

saket commented Apr 18, 2017

Awesome!

thagikura added a commit that referenced this issue Apr 21, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
thagikura added a commit that referenced this issue Apr 21, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
thagikura added a commit that referenced this issue Apr 21, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
@thagikura thagikura added this to the 0.3.0-alpha4 milestone Apr 21, 2017
@thagikura
Copy link
Contributor

Fixed by #269.

I'll release it in the next alpha version.

thagikura added a commit that referenced this issue May 26, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
thagikura added a commit that referenced this issue May 26, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
thagikura added a commit that referenced this issue Jun 14, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
thagikura added a commit that referenced this issue Jun 15, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
thagikura added a commit that referenced this issue Jun 16, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

Fixes #262
thagikura added a commit that referenced this issue Jun 28, 2017
A dirty flag is used to indicate whether the flex line that hods a dirty
flag needs to be recomputed.

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

No branches or pull requests

2 participants