如何实现拖放在Android的下降? [英] How to implement Drag and Drop in android?

查看:163
本文介绍了如何实现拖放在Android的下降?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款益智游戏,用户必须安排在网格中的图像。下面的截图给出

I am developing a puzzle game, where user has to arrange the images in the grid. The screenshot is given below

欲能够向电网中的一个细胞的图像拖动到另一小区。我找遍许多网站和每一个地方,我发现用拖放的例子拖放API(即通过使用OnDragListener等),这是在Android 3.0的推出,但我的应用程序应该在Android 2.2的。运行

I want to able to drag the image of one cell of the grid to another cell. I searched many sites and every where I found examples with Drag and drop API (I.e. by using OnDragListener etc.) which was introduced in Android 3.0, but my application should run in Android 2.2.

所以,请帮助我如何使用触摸API来实现它(即OnTouchListener等)

So please help me how to implement it using Touching API (I.e. OnTouchListener etc.)

推荐答案

请点击此链接,你答对了
祝您好运。

follow this link you got the right Answer Best of luck

<一个href=\"http://stackoverflow.com/questions/9306243/how-to-implement-drag-and-drop-in-android-2-2/11431727#11431727\">How实现拖动和Android 2.2的下降?

这是我的code和我发展
我也通过这个链接

This is my code and develop by me i also got the guide line by this link

http://$c$c.google.com/p/rxwen-blog-stuff/source/browse/#svn/trunk/android/drag

<一个href=\"http://$c$c.google.com/p/android-drag-and-drop-basic/source/browse/src/edu/sbcc/cs123/draganddropbasic/DragAndDropBasicActivity.java\" rel=\"nofollow\">http://$c$c.google.com/p/android-drag-and-drop-basic/source/browse/src/edu/sbcc/cs123/draganddropbasic/DragAndDropBasicActivity.java

这篇关于如何实现拖放在Android的下降?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆