Nathan Castlehow
04/19/2021, 8:16 AMNathan Castlehow
04/19/2021, 8:16 AMNathan Castlehow
04/19/2021, 8:17 AMBox(modifier = Modifier.height(IntrinsicSize.Min),contentAlignment = Alignment.TopStart) {
Divider(
modifier = Modifier
.padding(6.dp)
.fillMaxHeight()
.width(12.dp)
.background(color = Color.Red)
)
ExpandingContent()
}
Nathan Castlehow
04/19/2021, 8:19 AMBox(contentAlignment = Alignment.TopStart) {
Divider(
modifier = Modifier
.padding(6.dp)
.matchParentSize()
.requiredWidth(12.dp)
.background(color = Color.Red)
)
ContentWhichExpands()
}
Nathan Castlehow
04/19/2021, 8:20 AMZach Klippenstein (he/him) [MOD]
04/19/2021, 12:21 PMmatchParentWidth
and matchParentHeight
modifiers?Nathan Castlehow
04/20/2021, 1:16 AMZach Klippenstein (he/him) [MOD]
04/20/2021, 2:16 AMNathan Castlehow
04/20/2021, 2:56 AMZach Klippenstein (he/him) [MOD]
04/20/2021, 3:18 AMmatchParentSize
comes before the requiredWidth
, that’s effectively saying there’s a box that should take up the entire width, and then inside of that a smaller box that only takes up 12 dp, and so the smaller box gets centered inside the big one. But if you file a bug, please post it here so i can follow it – i’m curious what the recommended approach would be if it’s not.Zach Klippenstein (he/him) [MOD]
04/20/2021, 3:18 AMrequiredWidth
before the matchParentSize
? Probably wouldn’t work either, but i’m curious what that would doNathan Castlehow
04/20/2021, 4:53 AMNathan Castlehow
05/11/2021, 1:35 AM