Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
504 views
in Technique[技术] by (71.8m points)

android - How to Drag drop Listview item to another Listview

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...