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

Handle resizes of items in LazyColumn on iOS #2450

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

squarejesse
Copy link
Contributor

This hooks up the recently-introduced ResizableWidget.SizeListener interface to UIViewLazyList.

Unfortunately it's introducing unexpected additional measure calls to rows unimpacted by size changes. I suspect this is a bug in UITableView.

Closes: #1254


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

This hooks up the recently-introduced ResizableWidget.SizeListener
interface to UIViewLazyList.

Unfortunately it's introducing unexpected additional measure calls
to rows unimpacted by size changes. I suspect this is a bug in
UITableView.

Closes: #1254
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old layout was too tall!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old layout was too tall!

}

internal fun setContent(content: UIView?) {
removeAllSubviews()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inlined removeAllSubviews() here, and changed it to use the new content property

@squarejesse squarejesse merged commit 2abb025 into trunk Nov 15, 2024
11 checks passed
@squarejesse squarejesse deleted the jwilson.1113.lazy_list_resizes branch November 15, 2024 14:45
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

Successfully merging this pull request may close these issues.

Calculate size for individual items. This commented code currently hangs the UI ...
2 participants