There is an ExpandableListView, there are several top-level elements in it, and a dozen nested list elements in them!

The problem is that you need to realize the possibility of dragging nested elements, both in the area of ​​one group, and in other groups!

Perhaps there is no standard solution to this problem? What to do in this situation?

How can this be done? What should I use?

1 answer 1

There are several libraries that allow this (obviously not all are listed):

  1. Drag and Drop Expandable ListView , proposed by Android Android in the comments
  2. DragListView . There is no ExpandableListView on the demo, but pay attention to the BoardView , you might like this implementation.
  3. Advanced RecyclerView , based on a more customizable RecyclerView instead of ExpandableListView . Here is just an example of using drag-and-drop with a grouped list.

If the use of third-party libraries is impossible for some reason, then here you can find an example of self-implementation of drag-and-drop, true for a regular ListView

In general, I would advise using Advanced RecyclerView because of the extensive documentation and customization features. If you need as simple a solution as possible, then a Drag and Drop Expandable ListView would probably be the best option.