Daniele Segato
10/28/2022, 12:58 PMfun Modifier.layoutVertically() =
rotate(-90f).layout { measurable, constraints ->
val swappedConstraints = constraints.copy(
minWidth = constraints.minHeight,
maxWidth = constraints.maxHeight,
minHeight = constraints.minWidth,
maxHeight = constraints.maxWidth,
)
val placeable = measurable.measure(swappedConstraints)
layout(placeable.height, placeable.width) {
placeable.place(
x = -(placeable.width / 2 - placeable.height / 2),
y = -(placeable.height / 2 - placeable.width / 2)
)
}
}
If I have a layout with this modifier inside I can't use Intrinsic sizing, I get this error:
java.lang.IllegalArgumentException: Can't represent a size of 2147483515 in Constraints
Daniele Segato
10/28/2022, 12:59 PMRafs
10/28/2022, 7:19 PMColumn
does?Daniele Segato
10/28/2022, 7:20 PMRafs
10/28/2022, 7:22 PMColumn
. I could be missing the motive behind your question though.Daniele Segato
10/28/2022, 7:23 PM