Vsevolod Ganin
01/16/2021, 1:45 PMmatchParentSize modifier is available only in BoxScope? It could be useful in any layout scope I think, as well as matchParentWidth and matchParentHeightTimo Drick
01/16/2021, 1:47 PMVsevolod Ganin
01/16/2021, 1:52 PMColumn {
Text(...)
Canvas(modifier = Modifier.fillMaxWidth().height(1.dp)) {
drawLine(color, Offset(0f, 0f), Offset(size.width, 0f))
}
Text(...)
}
And I getVsevolod Ganin
01/16/2021, 1:53 PMCanvas into account while measuring, I just want to set it to be in size as the rest of the content dictatesTimo Drick
01/16/2021, 1:57 PMTimo Drick
01/16/2021, 2:00 PMTimo Drick
01/16/2021, 2:17 PMromainguy
01/16/2021, 7:52 PMromainguy
01/16/2021, 7:52 PMAdam Powell
01/16/2021, 8:02 PMAdam Powell
01/16/2021, 8:03 PMmatchParentSize in Box is an instruction to measure that element last, with whatever specific size the Box has already determined for itself, potentially from measuring its other child elements first.Adam Powell
01/16/2021, 8:05 PMTimo Drick
01/16/2021, 8:20 PMColumn(Modifier.preferredWidth(IntrinsicSize.Min)) {
Text(text = "4")
Divider(modifier = Modifier.fillMaxWidth().preferredHeight(1.dp),color = Color.Black)
Text(text = "2")
}