OnCameraChangeListener is not responsive enough - is there another way?

六月ゝ 毕业季﹏ 提交于 2019-12-04 12:37:26
chose007

Try to wrap the MapFragment (or MapView) inside your custom class inherited from something like RelativeLayout. Then you can override onInterceptTouchEvent or dispatchTouchEvent in that custom layout and move your custom view from there. I tried it myself and it will give you definitely more callbacks than with the onCameraChange.

You can also take a look at my answer here:
Google Maps Android API v2 - Interactive InfoWindow (like in original android google maps)
I was dealing with something little bit different (I tried to avoid moving custom views over the map but I needed only some buttons on an infoWindow), but I used this wrapping layout there too.

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