Is it possible to have feature like drag and drop between two different RecyclerView
?
I found library for drag and drop within RecyclerView
. Please help me to improve this functionality.
Drag and Drop can be added in a RecyclerView using the ItemTouchHelper utility class. Following are the important methods in the ItemTouchHelper. Callback interface which needs to be implemented: isLongPressDragEnabled - return true here to enable long press on the RecyclerView rows for drag and drop.
Android Swipe To Delete. Swipe to delete feature is commonly used to delete rows from a RecyclerView. In order to implement Swipe to delete feature, we need to use the ItemTouchHelper utility class.
I had a similar requirement in one of our projects. You can check out the sample code that I have uploaded here - RecyclerView Drag and Drop
It is a very basic code that matches your requirement - Drag and drop within a single recyclerview as well as between two different recyclerviews.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With