Итак, текст находится слева, и когда он выходит за пределы высоты изображения, он должен занимать всю длину экран.
Мне интересно, как этого добиться. Если это будет BoxwithConstraints, индивидуальный макет. Или это можно сделать с помощью простого объединения строк и столбцов, поля.
В настоящее время моя композиция выглядит примерно так:
Код: Выделить всё
Column(
modifier = Modifier.fillMaxWidth()
) {
Row(
modifier = modifier.fillMaxWidth()
.padding(horizontal = 8.dp)
) {
Column(
modifier = Modifier.weight(1f)
) {
StarRatingBar(movieDetail.voteAverage)
Text(
color = Color.Black,
fontWeight = FontWeight.SemiBold,
text = movieDetail.genres.joinToString(" • ") { genre -> genre.name },
fontSize = 16.sp,
textAlign = TextAlign.Start
)
Text(
color = Color.DarkGray,
text = "Running time ${movieDetail.runtime.minutes}")
Text(text = "Revenue $${movieDetail.revenue.formatNumberWithSuffix()}")
/** Don't show if there is zero budget*/
if (movieDetail.budget > 0) {
Text(text = "Budget $${movieDetail.budget.formatNumberWithSuffix()}")
}
Text(
color = Color.LightGray,
fontSize = 22.sp,
fontWeight = FontWeight.Bold,
text = "Overview")
Text(
color = Color.White,
modifier = Modifier.fillMaxWidth(),
fontSize = 18.sp,
fontWeight = FontWeight.SemiBold,
text = movieDetail.overview
)
}
KamelImage(
resource = { asyncPainterResource(data = movieDetail.posterPath) },
contentDescription = movieDetail.title,
modifier = Modifier.size(150.dp, 250.dp).clip(RoundedCornerShape(8.dp)),
contentScale = ContentScale.FillHeight,
onLoading = {_ ->
CircularProgressIndicator(
color = Color.Blue
)
},
onFailure = {
Image(imageVector = vectorResource(Res.drawable.compose_multiplatform), contentDescription = null)
},
)
}
}

Подробнее здесь: https://stackoverflow.com/questions/791 ... composable