Atul Gupta
03/25/2025, 4:48 PMalign
parameter in requiredHeightIn
or is there other way to achieve this?Zach Klippenstein (he/him) [MOD]
03/25/2025, 4:57 PM.wrapContentHeight(align = …)
.requiredHeightIn(…)
Zach Klippenstein (he/him) [MOD]
03/25/2025, 4:58 PM.wrapContentHeight(unbounded = true, align = …)
.heightIn(…)
Atul Gupta
03/25/2025, 5:07 PM.requiredHeightIn(…)
then found the issue that my content was being central aligned(as mentioned in the doc) then used the .wrapContentHeight(unbounded = true, align = …)
as I wanted to have my content not squeezed in the available space rather go outside the bounds of the parent Composable then thought there is no need of requiredHeightIn
as wrapContentHeight
with unbounded already discards the incoming max constraintsAtul Gupta
03/25/2025, 5:17 PM.requiredHeightIn(min = 40.dp)
when same can be achieved by
.wrapContentHeight(unbounded = true)
.heightIn(min = 40.dp)
Zach Klippenstein (he/him) [MOD]
03/25/2025, 5:24 PMrequiredHeightIn
mostly in tests, where I want to force a container size but don't care how that container's parent places it.Zach Klippenstein (he/him) [MOD]
03/25/2025, 5:26 PMrequired*
should still report the actual height to the parent via Placeable.measuredHeight
, which you could potentially consume with a custom layout (afaik none of the built-in layouts read that property). But that smells pretty weird too, at that point I would probably expect the custom layout to just pass different constraints to the child.