Android map api-2 disable click

↘锁芯ラ 提交于 2019-12-22 05:24:12

问题


I'm in the middle of migrating one of my app to the Android map V2. I'm showing a marker on the map and don't want to send touch events to the map to change the position/zoom level etc. in the earlier version, i was able to disable touch by setting android:clickable="false" in the MapView . how can i do the same thing in the Android map V2?


回答1:


yourmap.getUiSettings().setAllGesturesEnabled(false);



回答2:


Figured it out myself.

mMapFragment.getView().setClickable(false);


来源:https://stackoverflow.com/questions/14873288/android-map-api-2-disable-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!