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

Fix a bug with Modifier.flex() nested in a row and column #2362

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

swankjesse
Copy link
Collaborator

@swankjesse swankjesse commented Oct 3, 2024

This is a bug in Android only caused by not explicitly handling MeasureSpec.UNSPECIFIED.

Closes: #2018

widthConstraint == Constraint.Fill -> widthSize.toFloat()
else -> Size.UNDEFINED
},
requestedHeight = when {
heightMode == MeasureSpec.EXACTLY -> heightSize.toFloat()
heightMode == MeasureSpec.UNSPECIFIED -> Size.UNDEFINED
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without the fix this nested spacer is asked to size itself using (mode=AT_MOST, size=0) and it returns a height of 0.

Base automatically changed from jwilson.1003.same_strategy to trunk October 4, 2024 15:10
This is a bug in Android only caused by not explicitly handling MeasureSpec.UNSPECIFIED.
@swankjesse swankjesse merged commit 1d5d711 into trunk Oct 4, 2024
7 checks passed
@swankjesse swankjesse deleted the jwilson.1003.flex_nested branch October 4, 2024 15:11
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.

Android: A widget with Modifier.flex() will do very bad things if nested inside of a Row + Column
3 participants