Android和的GoogleMaps:禁用的MapView拖动 [英] Android and GoogleMaps: disable the mapView dragging

查看:557
本文介绍了Android和的GoogleMaps:禁用的MapView拖动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android和的GoogleMaps:我可以禁用图形页面拖动无禁用捏放大功能?
THX的答案

Android and GoogleMaps: Can I disable the mapView dragging without disable the pinch to zoom function? Thx for answer

推荐答案

使用 GestureDetector SimpleOnGestureListener ,使用 onFling()来检测路径用户之间的距离确实用他的手指从第一触摸到发行与 .getX()的getY()每个 MotionEvent ,什么也不做了 X> SOMEMAXVALUE 和 Y'GT; SOMEMAXVALUE 。我希望你能找到你的方式。

Use GestureDetector and SimpleOnGestureListener, use onFling() to detect the distance between the path user did with his finger from the first touch till the release with .getX() and getY() from each MotionEvent and do nothing for x > SOMEMAXVALUE and y > SOMEMAXVALUE. I hope you'll find your way.

这篇关于Android和的GoogleMaps:禁用的MapView拖动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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