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

Issue with different sizes of reorderable items and scale #46

Closed
RicardasBivainis opened this issue Aug 27, 2024 · 3 comments
Closed

Issue with different sizes of reorderable items and scale #46

RicardasBivainis opened this issue Aug 27, 2024 · 3 comments

Comments

@RicardasBivainis
Copy link

RicardasBivainis commented Aug 27, 2024

When dragging large reorderable items in LazyColumn on a device with increased scale or zoom, they sometimes automatically release the drag and trigger the onDragStopped event.
It's quite easy to replicate using demo app, increasing scale of the device and adding bigger items to itemList


val sizes = listOf(50, 200, 250,300)

val items = (0..200).map {
    Item(id = it, text = "Item #$it", size = sizes[it % sizes.size])
@Calvin-LL
Copy link
Owner

Calvin-LL commented Aug 28, 2024

Does it happen with very big items without scaling? Might just be a duplicate of #4 (comment). It will be fixed when Compose Foundation v1.7.0 is out on multiplatform. Try using v2.4.0-alpha02 to see if it still happens there.

@RicardasBivainis
Copy link
Author

It's seems the main problem is with item size, because it's easy to reproduce if you make it something like:
val sizes = listOf(50, 300, 450,500)
2.4.0-alpha02 version does not resolve the issue

@Calvin-LL
Copy link
Owner

Calvin-LL commented Aug 28, 2024

hmm with this in Items.kt

val sizes = listOf(50, 300, 450, 500)
val items = (0..200).map {
    Item(id = it, text = "Item #$it", size = sizes[it % sizes.size])
}

It seems to work fine in the demo app in 2.4.0-alpha02. Do you have a screen recording of it not working?

Screen_recording_20240828_081748.mp4

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