Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Recycled view holders retain old auto-sized size. #36

Open
JakeWharton opened this issue Jan 16, 2018 · 4 comments
Open

Recycled view holders retain old auto-sized size. #36

JakeWharton opened this issue Jan 16, 2018 · 4 comments

Comments

@JakeWharton
Copy link
Owner

Check out Toolbar.SavedState compared to its neighbors above and below. Framework bug?

screenshot_20180116-151727

cc @chrisbanes

@chrisbanes
Copy link
Contributor

Yeah, looks like a framework bug to me. Either that or ConstraintLayout is doing something weird, but I doubt it's that.

@chrisbanes
Copy link
Contributor

Worked it out. The issue is that ConstraintLayout for some reason is caching the TextView's height. This then trips up TextView's internal logic for whether it needs to do a full layout (which it does if the size changes).

@JakeWharton
Copy link
Owner Author

This can be easily reproduced by searching for "View" and then doing moderate flings down to the bottom and then back up. Usually the 4th or 5th item from the top will retain the smaller size from the recycled views.

@JakeWharton
Copy link
Owner Author

Got a 100% repro case. On a Nexus 4 emulator, search "Toolbar", rotate left, scroll to bottom, rotate right, scroll to top.

screen shot 2018-05-31 at 11 42 47 pm

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

No branches or pull requests

2 participants