Moving MapFragment (SurfaceView) causes black background flickering

后端 未结 16 1389
误落风尘
误落风尘 2020-12-04 09:32

I\'m trying to implement new Android Google Maps API (v2). However it doesn\'t seem to go well with SlidingMenu. As you may know, MapFragment implementation is

16条回答
  •  [愿得一人]
    2020-12-04 09:49

    Here's a crazy idea, don't move the MapView ;-)

    That is, create a MapView full screen width behind your app in a FrameLayout. Then lay your views on top, and punch a hole through to the MapView in the position you need to display it. When moving you'll need to update the map position to stay in sync so the user keeps seeing the same section of the map, but that should update better than moving a surface view around.

提交回复
热议问题