Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #58

Open
cmseo opened this issue Nov 15, 2024 · 3 comments

Comments

@cmseo
Copy link

cmseo commented Nov 15, 2024

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) } ) {

@Calvin-LL
Copy link
Owner

Can you reupload the video? I can't see it :(

@cmseo
Copy link
Author

cmseo commented Nov 15, 2024

can you see it?

screen-20241115-192129.mp4

@Calvin-LL
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants