【问题标题】:Cancel onTouchEvent when GestureDetector's onDoubleTap triggers当 GestureDetector 的 onDoubleTap 触发时取消 onTouchEvent
【发布时间】:2015-05-26 14:46:44
【问题描述】:

写意的View实现了onTouchEvent的绘图操作。

此外,GestureDetector 可以识别双击事件来擦除绘图。但是,当双击发生时,onTouchEvent 会触发一个 ACTION_UP,这会在视图上绘制一个不需要的点。

在 iOS 中我使用 touchesCancelled 方法处理了这些问题,在 Android 中是否有类似的东西?

【问题讨论】:

    标签: android touch-event gesturedetector touchescancelled


    【解决方案1】:

    我通过处理 onDoubleTapEvent 而不是 onDoubleTap 解决了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-16
      • 2018-10-07
      • 2013-07-24
      • 2015-11-27
      • 2018-07-30
      • 1970-01-01
      相关资源
      最近更新 更多