Restoring MapView's state on rotate and on back

前端 未结 3 1469
Happy的楠姐
Happy的楠姐 2020-12-07 14:35

Background

I have a larger application in which I had/have several problems with new Google Maps API. I tried to describe it in a different question

3条回答
  •  醉话见心
    2020-12-07 15:11

    Implements your fragment/activity with GoogleMap.OnCameraChangeListener and override method onCameraChange and into you can save the new camera position, and onResume use

    googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPositionSaved));
    

提交回复
热议问题