Victor Yakovlev
09/07/2020, 6:47 PMfillMaxHeight
inside component where height is wrapContentHeight
?preferredHeight(IntrinsicSize.Min)
for parent, but if use CoilImage
inside parent we have exception: Intrinsic measurements are not currently supported by SubcomposeLayout
Adam Powell
09/07/2020, 6:58 PMVictor Yakovlev
09/07/2020, 7:06 PMIntrinsic measurements are not currently supported by SubcomposeLayout
Adam Powell
09/07/2020, 7:49 PMVictor Yakovlev
09/08/2020, 5:09 AMLazyColumnFor(items = listOf(1, 2, 3)) { item ->
Column(modifier = Modifier.fillMaxWidth()) {
Row(
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight()
.preferredHeight(IntrinsicSize.Min)
.padding(16.dp),
verticalGravity = Alignment.CenterVertically
) {
Box(
modifier = Modifier
.width(5.dp)
.fillMaxHeight(),
backgroundColor = Color.Cyan
)
Column(
modifier = Modifier.padding(start = 8.dp)
) {
ProvideEmphasis(emphasis = EmphasisAmbient.current.high) {
Text(
text = "App Name $item",
style = MaterialTheme.typography.subtitle1,
)
}
ProvideEmphasis(emphasis = EmphasisAmbient.current.medium) {
Text(
text = "App description",
style = MaterialTheme.typography.body2
)
}
}
}
Divider(
modifier = Modifier.padding(horizontal = 8.dp),
color = Color.DarkGray
)
}
}
preferredHeight(IntrinsicSize.Min)
to RowpreferredHeight(IntrinsicSize.Min)
and add CoilImage
as last child of Row
CoilImage(
data = "<https://picsum.photos/seed/123/300/300>",
contentScale = ContentScale.Crop,
modifier = Modifier
.width(50.dp)
.height(50.dp)
)
preferredHeight(IntrinsicSize.Min)
to Row and add CoilImage
as last child I have java.lang.IllegalStateException: Intrinsic measurements are not currently supported by SubcomposeLayout
Victor Yakovlev
09/08/2020, 6:48 PMAdam Powell
09/08/2020, 6:56 PM