nuhkoca
06/14/2022, 10:58 AMplaceablesnuhkoca
06/14/2022, 10:59 AMlayout(constraints.maxWidth, height) {
    titlePlaceable.placeRelative(x = 0, y = iconPlaceable.height / 2 - titlePlaceable.height / 2)
    iconPlaceable.placeRelative(x = titlePlaceable.width, y = 0)
    performancePlaceable.placeRelative(
        x = 0,
        y = iconPlaceable.height / 2 + titlePlaceable.height / 2 + titleBottomSpacing
    )
    followButtonPlaceable.placeRelative(
        x = constraints.maxWidth - followButtonPlaceable.width,
        y = (contentHeight - followButtonPlaceable.height) / 2
    )
}Filip Wiesner
06/14/2022, 11:00 AMis it possible to limit width ofNot of placeables butplaceables
mearurablenuhkoca
06/14/2022, 11:02 AMButton(Modifier.weight(1f))val placeables = measurables.map {
    it.measure(constraints)
}Filip Wiesner
06/14/2022, 11:04 AMnuhkoca
06/14/2022, 11:08 AMnuhkoca
06/14/2022, 11:10 AMFilip Wiesner
06/14/2022, 11:13 AMFilip Wiesner
06/14/2022, 11:20 AMval remainingWidth = constraints.maxWidth - spaceTakenByOtherComponents
buttonMeasurable.measure(
    Constraints(maxWidth = remainingWidth)
)nuhkoca
06/14/2022, 11:53 AMmeasurables.first().measure(constraints.copy(maxWidth = 150))Filip Wiesner
06/14/2022, 12:10 PMmeasurablescontentcontentConstraints(maxWidth = constraints.maxWidth, maxHeight = constraints.maxheight)Constraintsnuhkoca
06/14/2022, 1:28 PMConstraints(maxWidth = constraints.maxWidth, maxHeight = constraints.maxheight)TextIconButtonButtonTextIconFilip Wiesner
06/14/2022, 1:33 PMnuhkoca
06/14/2022, 3:42 PMnuhkoca
06/14/2022, 4:23 PMFilip Wiesner
06/14/2022, 4:25 PM