Home > Mobile >  Android RecycleView Item drag and drop into another RecycleView
Android RecycleView Item drag and drop into another RecycleView

Time:11-21



A similar design,
Demand is:
At the bottom of the list is a data set, I can drag one, to the above list, the above recycleView recycleView nested list I'm going to use to do,
My train of thought is recycleview should not cross domain drag and drop, I think after the drag and drop, assigned to a view on the current interface, and then determine whether the drag and drop the view point of coordinate in place area, the premise is placed object of this area is filled in advance, only id and picture I first set to 0; If a change in the current item model, refresh the item. Drag and drop out of that item, I don't remove, model modification field, there is this one, when the position of the mobile does not satisfy the place, before I move coordinate starting point, and then set the animation by the far point returns, modify the current item data refresh,

Consult the barons made similar to some other Suggestions, walk less detours,

CodePudding user response:

Your design is for imagination, demand

CodePudding user response:

Use between multiple RecyclerView setRecycledViewPool (RecycledViewPool) setting the same RecycledViewPool, they can share the Item,

CodePudding user response:

You of this effect is achieved

CodePudding user response:

The
reference let time reply: 3/f
is this your effect achieved,

This kind of feeling better use combinations: add a custom view, the outermost hidden by default, when a drag and drop the custom view to display and the first item RecyclerView display, follow your finger gestures, when towed to a second rv to hide and display

CodePudding user response:

The building Lord, you're doing now is not, I also meet the same requirements, strives for the demo

CodePudding user response:

The original poster ready please give a source to learn, thank you

CodePudding user response:

Main such demand ready no, novice demo genuflect is begged

CodePudding user response:

It use a third-party library, very good
https://github.com/CymChad/BaseRecyclerViewAdapterHelper/wiki/Use-it-drag-and-swipe-item

CodePudding user response:

refer to 6th floor NieYuWen response:
the building Lord, you do not now, I also meet the same requirements, strives for the demo
you did not

CodePudding user response:

Your idea is ok, but I think it does not need to populate the data in advance, determine the drag and drop the view in which recycleView, are the coordinates of the corresponding Adapter to join a data refresh, be corresponding Adapter to reduce drag and drop a data refresh; The same recycleView is the location of the sorting exchanged between itme

CodePudding user response:

https://github.com/free46000/MultiItem multiple recycleview drag and drop each other
  • Related