在两个 RecyclerView 之间拖放

Drag and Drop between two RecyclerView

是否可以在两个不同的 RecyclerView 之间使用拖放等功能?

我发现 library 可以在 RecyclerView 中拖放。请帮我改进这个功能。

无需使用第三方库,Support library现在支持recyleview的拖放,也许这篇文章会对你有所帮助

https://medium.com/@ipaulpro/drag-and-swipe-with-recyclerview-6a6f0c422efd

我在我们的一个项目中有类似的需求。您可以查看我在此处上传的示例代码 - RecyclerView Drag and Drop

这是符合您要求的非常基本的代码 - 在单个回收器视图内以及两个不同的回收器视图之间拖放。

希望对您有所帮助。

这篇lib可以帮到你。 检查示例示例,它会按照您的要求进行操作。 它有一个 BoardView,您可以在其中放置多个列表。

YouTube 演示视频:https://youtu.be/tNgevYpyA9E?t=30

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

看看我的 code sample on GitHub。它将帮助您了解如何在两个 RecyclerView 之间 Drag and Drop