How to Drag drop Listview item to another Listview

raynast picture raynast · Mar 25, 2011 · Viewed 12.8k times · Source

Hi I'm Raynast I'm a newbie for Android Programming Now I have a little problem from my project about Listview Drag and Drop

I decide layout to Three Listview query from database

     _________________________
     |list_1 |list_2 |list_3 |
     |_______|_______|_______|
     |_______|_______|_______|
     ||     |||     |||     ||
     ||item1|||item5|||item8||
     ||_____|||_____|||_____||
     |_______|_______|_______|
     ||     |||     |||     ||
     ||item2|||item6|||item9||
     ||_____|||_____|||_____||
     |_______|_______|       |
     ||     |||     ||       |
     ||item3|||item7||       |
     ||_____|||_____||       |
     |_______|       |       |
     ||     ||       |       |
     ||item4||       |       |
     ||_____||       |       |
     |_______|_______|_______|

I use android platform 2.3.1

I want to Drag item1 from Listview1 to liewview2 or liewview3 and drop between listviewitem

I try to research solution to resolve this problem but I'm not found!

Observations : MotionEvent have action_up action_down don't have action_right,left

I want to know solution to resolve this problem If it not possible tell me or propose another method to make this activity please

Thank in advance

Your response will be very useful for me and another one

Answer

mtparet picture mtparet · May 30, 2011

Hello I'm developing an example of this in github https://github.com/mtparet/Drag-And-Drop-Android

It could help you.

All contribution are welcome