Rafs
03/17/2021, 8:28 AMModifier.height
and Modifier.requiredHeight
?Geert
03/17/2021, 8:33 AMAndré Kindwall
03/17/2021, 8:57 AMColumn(Modifier.width(50.dp).background(Color.Red)) {
Box(Modifier.size(60.dp).background(Color.Green))
Box(Modifier.requiredSize(60.dp).background(Color.Blue))
}
BenjO
03/17/2021, 9:26 AMDeclare the preferred height of the content to be exactly heightdp. The incoming measurement Constraints may override this value, forcing the content to be either smaller or larger.requiredHeight
Declare the height of the content to be exactly [height]dp. The incoming measurement
[Constraints] will not override this value.
Danish Ansari
03/17/2021, 9:27 AMheight
is something which can change if the parent composable height
becomes less than defined height
whereas requiredHeight
doesn't change irrespective of parent composable's height
, view will go outside the borderRafs
03/17/2021, 10:06 AM