In LazyVerticalGrid, when an item is placed not on top of another item but an empty space where it can be moved, onMove is not called.
In LazyVerticalGrid, when an item is placed not on top of another item but an empty space where it can be moved, onMove is not called. Please check video atttached
Uploading screen-20241115-192129.mp4…
.
below is my data class. data class Item(val id: Int, val text: String, val span: Int)
first, i make item like below. val items = (0..200).map { Item(id = it, text = "#$it", span = (it % 3) + 1) }
make grid like below.
LazyVerticalGrid( columns = GridCells.Fixed(6), modifier = Modifier.fillMaxSize(), state = lazyGridState, contentPadding = PaddingValues(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp), horizontalArrangement = Arrangement.spacedBy(8.dp), ) { list.forEachIndexed { index, item -> item(key = item.id, span = { GridItemSpan(item.span) } ) {
Can you reupload the video? I can't see it :(
can you see it?
https://github.com/user-attachments/assets/853a00c1-5be8-412b-a38c-8d6509f75cea
Hmmm I don't think this can be done with the current architecture. I'll leave this issue open in case someone comes up with something.