aclassen / ComposeReorderable

Enables reordering by drag and drop in Jetpack Compose (Desktop) LazyList & LazyGrid.
Apache License 2.0
821 stars 86 forks source link

Drag Cancels if Initial Drag is Too Fast #271

Open sean-brown-dev opened 1 year ago

sean-brown-dev commented 1 year ago

Using the LazyColumn press and hold to drag implementation if you move your finger to drag too quickly to begin the drag it will be cancelled and not move. Once you've got the item to move even slightly after the initial press you can drag it around very rapidly without issue. It's almost like it "sticks" after being pressed without having moved yet and you have to make the initial drag at a slow enough pace or the drag gesture loses track of your finger and doesn't start.

I think this might be an internal issue in androidx.comose.foundation.gestures, because I even tried using a simple self-made implementation and had the same issue. Has anyone else noticed this?

https://github.com/aclassen/ComposeReorderable/assets/60934413/c63ee47c-a68e-4ccf-b9dd-418240784cd5

sean-brown-dev commented 1 year ago

I am curious to see whether this fixes it:

https://github.com/aclassen/ComposeReorderable/pull/257

EDIT: Tested it out, this issue still exists.

zhuhj8 commented 1 month ago

I encountered the same problem

sean-brown-dev commented 1 month ago

I encountered the same problem

I switched to this library. It works without any issues and is being maintained.

https://github.com/Calvin-LL/Reorderable