chris
07/15/2020, 10:48 PMConstraintLayout {
val (title, body, arrow) = createRefs()
Text("This is a title for you", modifier = Modifier.constrainAs(title){
linkTo(parent.start, arrow.start, bias = 0.0F)
top.linkTo(<http://parent.top|parent.top>)
})
Text(
"Some really long lorem ipsum text would go here and try to fit in a preview card.",
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.constrainAs(body) {
top.linkTo(title.bottom)
linkTo(title.start, arrow.start, bias = 0.0F)
}
)
Icon(
asset = Icons.Filled.KeyboardArrowRight,
modifier = Modifier.size(20.dp).constrainAs(arrow) {
centerVerticallyTo(parent)
end.linkTo(parent.end)
}
)
}
The text of the body seems to overlap with the arrow. I cannot figure out how to make the width of the body text start at the parent and stop at the start of the arrow. Am I doing something wrong?