15

How to drag and drop items in Listview for reordering in android?

teksquery
  • 151
  • 1
  • 1
  • 4
  • possible duplicate of [Android List View Drag and Drop sort](http://stackoverflow.com/questions/2909311/android-list-view-drag-and-drop-sort) – akshay Feb 18 '15 at 11:10

4 Answers4

15

Here is our drag & drop list. It is a direct replacement for ListView and it's very easy to use. There are examples of how to use it on the github page.

https://github.com/terlici/DragNDropList

Stefan
  • 849
  • 9
  • 15
7

A good example on the topic can be found here: https://github.com/mtparet/Drag-And-Drop-Android

Luke
  • 1,069
  • 18
  • 28
Terril Thomas
  • 1,486
  • 13
  • 32
5

This has been discussed elsewhere. Try:

Reordering Lists like playlists in the media player

or

Android - drag and drop - list rearrange

Unfortunately, there seems to be no easy way to do it. You'll have to handle touch events at a fairly low level.

Community
  • 1
  • 1
Dalbergia
  • 1,699
  • 1
  • 17
  • 26
3

Check this.. exactly what you needed. Drag and Drop

xydev
  • 3,409
  • 5
  • 34
  • 54
  • 3
    This drag and drop example does not work completely. If you ListView has more tiems than fit on the screen, it does not scroll as you try to drag. Use this one instead: https://github.com/commonsguy/cwac-touchlist – Plastic Sturgeon Sep 28 '11 at 21:27