Я пытаюсь сделать предмет внутри LazyverticalGrid пролета полной доступной высоты, но он не расширяется, как и ожидалось. < /p>
Box(modifier = Modifier.fillMaxSize()) {
LazyVerticalGrid(
GridCells.Adaptive(120.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
modifier = Modifier.fillMaxSize() // Ensures grid takes full space
) {
item(span = { GridItemSpan(maxLineSpan) }) {
Box(
modifier = Modifier.fillMaxSize().background(Color.Red) // Ensures item takes full available space
) {
}
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... ck-compose