Jiri Bruchanov
.height(IntrinsicSize.Max)
@Composable fun Sample() { Box( modifier = Modifier .fillMaxSize() .background(Color.Red.copy(alpha = 0.15f)) ) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier .height(IntrinsicSize.Max) .fillMaxWidth() .background(Color.Black) ) { ConstraintLayout( modifier = Modifier .background(Color.Red) .weight(1f) .fillMaxWidth() .background(Color.Yellow) ) { val (ref1, ref3) = createRefs() //createHorizontalChain(ref1, ref3) Text("Start", modifier = Modifier.constrainAs(ref1) { start.linkTo(parent.start) }) Text("End", modifier = Modifier.constrainAs(ref3) { end.linkTo(parent.end) }) } Box( modifier = Modifier .size(64.dp) .background(Color.Cyan) ) } } }
A modern programming language that makes developers happier.