如何使用Android版本view.setX()方法小于3.0 [英] how to use view.setX() method in android version less then 3.0

查看:265
本文介绍了如何使用Android版本view.setX()方法小于3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要实现拖放功能,但该设备的版本是2.2.1所以应用程序不工作我是用onTouch方法和设置坐标使用SETX()和塞蒂(),但这种方法是不工作对我的设备版本请告诉我alternet的方式来实现此先谢谢了

i want to implement drag and drop feature but the device version is 2.2.1 so application is not working i am use onTouch method and set coordinate using setx() and setY() but this method is not working on my device version please tell me the alternet way to implement this thanks in advance

推荐答案

很遗憾的Andr​​oid支持包不包含新的拖放正下降,由11 API(安卓3.0),可能是因为它需要平台端的变化。

Unfortunatelly Android Support Package doesn't contain new Drag-n-Drop from API 11 (Android 3.0) probably because it would need platform-side changes.

基本上,你可以找到在Android 2.1的源代码$ C $下启动的例子。但是,这是一个有点复杂。结帐定制 >的ListView 组件以及拖放正下降。这对我帮助很大,当我有相同的任务。

Basically you can find examples in Android 2.1 source code for Launcher. But it's a bit complicated. Checkout this implementation of custom ListView component with drag-n-drop. It helped me a lot when I had the same task.

这篇关于如何使用Android版本view.setX()方法小于3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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