Drag and drop an item from one recyclerview (listview) into another recyclerview (listview)

吃可爱长大的小学妹 提交于 2019-12-10 17:35:08

问题


I have a requirement that need to drag an item from one recyclerview into another recyclerview.

I found some some of the useful resource as with the help of ItemTouchHelper

Also find a library to drag and drop in android here.

While implementation, am able to drag the item view along with the pointer(finger) on the screen, but not able success to achieve my requirement.

Please share me if you have any previous experience on this.


回答1:


For multiple list view drag and drop you can refer this https://github.com/woxblom/DragListView

Features

  • Re-order items in a list, grid or board by dragging and dropping with nice animations.
  • Add custom animations when the drag is starting and ending.
  • Get a callback when a drag is started and ended with the position.
  • Disable and enable drag and drop

Simple implementation of Drag and Drop in RecyclerView is given below

https://github.com/AleBarreto/DragRecyclerView



来源:https://stackoverflow.com/questions/37583571/drag-and-drop-an-item-from-one-recyclerview-listview-into-another-recyclerview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!