Jetpack Compose Constraint Layout Constrains Not Linking
I'm using constrainAs with Jetpack Compose to constrain a list of wifi options to the top of the parent and then to the bottom of a text view. As seen from the photo my list isn't
Solution 1:
In your List remove the .fillMaxHeight()
modifier and add the constraint height = Dimension.fillToConstraints
WifiList(
//....
modifier = Modifier
.constrainAs(list) {
top.linkTo(parent.top, margin = 8.dp)
bottom.linkTo(text1.top)
start.linkTo(parent.start)
end.linkTo(parent.end)
height = Dimension.fillToConstraints
}
)
Post a Comment for "Jetpack Compose Constraint Layout Constrains Not Linking"