2

I see it done a lot lately on android: I can drag an item in a listView to another position in the list. But I can't seem to find any example code. Does anyone have some example code they don't mind sharing. I have been reading http://developer.android.com/guide/topics/ui/drag-drop.html, but I am not making much progress.

Complication

So I find what seems to be a simple way to accomplish the drag-sort (http://ericharlow.blogspot.com/2010/10/experience-android-drag-and-drop-list.html). But my child views are clickable themselves, and that seem to block the parent ListView from seeing my drag events. Any ideas how to fix this?

Cote Mounyo
  • 13,817
  • 23
  • 66
  • 87
  • Thanks for the link, the question, and the upvote...I ended up abandoning the drag-drop idea because I wanted my rows to have a long-press context menu...but I'll follow this issue for future use as I know I'll want to implement this. – kwishnu Aug 23 '13 at 03:55

1 Answers1

4

The bauerca listview is a possibility...this SO post deals with the fact that it is somewhat complicated, and offers a library to consolidate things; the Git source code can be found here. Good Luck, it worked for me with some difficulty!

Community
  • 1
  • 1
kwishnu
  • 1,730
  • 19
  • 17