redwood
redwood copied to clipboard
Android: A Row with 2 children can calculate a size too large for the second child
Summary
On Android, when two children are nested inside a Row
, and the childrens' combined content are greater than the Row's width, the second child's calculated width will exceed the parent Row's bounds. It looks like the second child's width will grow to match the Row's width, despite the first child taking up some of that space.
Works as expected on iOS.
Repro
Row {
Spacer(30.dp)
Text("This is a very long piece of text that will wrap the screen")
}
Screenshots
Attempted tweaks
- Adding
Modifier.shrink()
orModifier.flex()
to the second child makes it work as expected. - Adding
Modifier.grow()
to the second child has no effect