iPaulPro / Android-ItemTouchHelper-Demo

Basic example of using ItemTouchHelper to add drag & drop and swipe-to-dismiss to RecyclerView.
Apache License 2.0
2.51k stars 499 forks source link

Able to drag (not drop) outside of Recyclerview or add DragShadow #60

Open JKorsten opened 4 years ago

JKorsten commented 4 years ago

Hey Paul,

Great demo (although it doesn't compile for me, I could use the classes and get it to work in my app). But I have a question. Is it possible to see the selected item (the one which you are dragging) also outside the RecyclerView. I don't want to drop it there but it is possible that with dragging I will pass my recyclerview bounds and then the item will be cut off or even become invisible.

Is this possible using the ItemTouchHandler or should I do this in another way?

Another solution can be to use a DrawShadow which can be moved around the screen and use the ItemTouchHandler to do the reordering.

Kind regards,

JKorsten