android - 我们如何在android中创建多点触控?

标签 android image multi-touch

我们可以在 Android 中创建多点触控吗? 我有多个图像,必须将这些图像一起拖放到 我的设备。是否可以?如果可能的话,任何想法都会有很大帮助。

谢谢

最佳答案

您需要拦截 View 中的触摸事件。实现一个 onTouchListener 并在函数内部:

 onTouch (View v, MotionEvent event){
    int count=getPointerCount();
   if(count >1){
      // it means there are more than 1 point touched on the screen.
   }
}

这仅在 API 5 之后可用

关于android - 我们如何在android中创建多点触控?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8192209/

相关文章:

image - 什么是图像矢量?

html - 为什么从图像到边框底部有间隙?

objective-c - 如何忽略屏幕上多余的手指?

windows-7 - 多点触控桌面设备的经济选择(在 Windows Phone 7 模拟器上测试应用程序)?

c# - WPF - 是否可以(以编程方式)禁用多点触控?

android - 比较字符串时间和当前时间android

android - undefined reference 错误,无法创建共享库

image - 使用 OpenCV 2 进行背景减除

XML 布局中的 Android GLSurfaceView

android - 内部应用更新 : clientVersionStalenessDays() returning null when testing with internal app sharing