How to implement drag and drop elements between two lists in android?

I am developing an application that requires the Drag & Drop function to transfer items from one list to another. Is there a way to remove an item to another list since I saw applications for dragging items in one list (reordering the list)?

+3
source share
1 answer

This is more a direction of research than an answer. Have you tried listening for the button / touch event in one list to get the item that you want to use to drag and drop, and then listening for the button / touch event in the other list so that you know which index to insert the item?

button/touch down View, . , , setTag() getTag() .

- , .

+1

Source: https://habr.com/ru/post/1768747/


All Articles