Android - drag and drop - list rearrange
Solution 1:
Even though this question is already answered. I struggled using the music app as an example, so I created a simple Drag and Drop List project to help others that can be found here
Solution 2:
Pay special attention to this one
com.android.music.TouchInterceptor
Solution 3:
You can also try my recent implementation here:
- https://github.com/bauerca/drag-sort-listview
It gives smooth scrolling while dragging and supports list items with arbitrary heights. Lots of jumpy behavior has also been removed as compared to the TouchInterceptor.
Solution 4:
It's in platform/packages/apps/Music/src/com/android/music/TouchInterceptor.java
. Here's a direct link:
https://android.googlesource.com/platform/packages/apps/Music/+/master/src/com/android/music/TouchInterceptor.java