开发者

Android MapActivity onLongPress / zooming mix up

开发者 https://www.devze.com 2023-04-02 08:17 出处:网络
I have a class extending MapActivity which has an overlay attached to it extending ItemizedOverlay.Inside the overlay I have a GestureDetector and a OnGestureListener.Now for my problem:

I have a class extending MapActivity which has an overlay attached to it extending ItemizedOverlay. Inside the overlay I have a GestureDetector and a OnGestureListener. Now for my problem:

I have an action which triggers in the onLongPress of the OnGestureListener but Android triggers this even when you zoom in / out using the "pinch" gesture. T开发者_开发百科his is due to the fact that one finger tends to stay in one spot while the other one moves towards / away. What kind of calls or checks could be implemented to detect whether the action is a pinch-zoom or a longPress, so I know to either handle or disregard in onLongPress?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号