Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag and Drop between two RecyclerView

Tags:

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.

like image 787
ramji Avatar asked Apr 17 '15 04:04

ramji


People also ask

How to drag and drop RecyclerView Android?

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.

How do I move items in RecyclerView?

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.


1 Answers

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.

like image 87
sanedroid Avatar answered Sep 27 '22 23:09

sanedroid