I need to display multiple texts line by line, similar to a paragraph. My desired implementation resembles the following:
My current implementation is shown below:
Here is the code,
ConstraintLayout(modifier = Modifier.fillMaxWidth()) {
val (title, viewAll) = createRefs()
Text(text =
"TestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestDataTestData ",
modifier = Modifier
.background(Color.White)
.constrainAs(title) {
top.linkTo(
parent.top
)
start.linkTo(parent.start)
end.linkTo(viewAll.start)
width = Dimension.preferredWrapContent
}
)
Text(
text = "Learn more",
style = TextStyle(
color = MaterialTheme.colorScheme.primary,
textDecoration = TextDecoration.Underline
),
modifier = Modifier.constrainAs(viewAll) {
start.linkTo(
title.end,
2.dp
)
end.linkTo(parent.end)
bottom.linkTo(title.bottom)
}
)
}


You can display paragraph with Clickable Text like this.