AG
07/05/2020, 3:40 PMLazyRowItems
with wrap content
inside LazyColumnItems
work correctly. In this example I have a row with images where each image has width 100dp. When I’m not passing modifier value with height in LazyRowItems
it shows only one row and Text is not rendering , also it’s possible to scroll the page, but when I’m passing modifier with preferredHeight
all works correctly, wrapContentHeight
not working also.
LazyColumnItems(items = List(size = 30, init = { it })) { column ->
if (column % 2 == 0) {
LazyRowItems(
items = List(size = 30, init = { it })
//modifier = Modifier.preferredHeight(100.dp)
) { row ->
Image(
asset = imageAsset,
modifier = Modifier.wrapContentHeight(100.dp).aspectRatio(1f)
)
}
} else {
Text(text = "$column")
}
}
Andrey Kulikov
07/05/2020, 8:14 PMAG
07/05/2020, 8:36 PM