Search code examples
androidandroid-layoutdrag-and-drop

Drag and drop to rearrange elements position inside a LinearLayout? Using android


The main menu of my app is a list of elements represented by some button and textviews inside a relativelayout. They are themselves stored into a vertical LinearLayout, scrollable and with just one column.

I would like to know if it was possible with this configuration to rearrange my relativelayouts inside the LinearLayout by draging and droping the elements.

I saw some examples for listview but nothing which can help me...

Thanks in advance.


Solution

  • For the people in my case, using a linear layout rather than a listview, I recommend this: https://github.com/justasm/DragLinearLayout