I’m having awful problems with this. I have a MapView, in my activity I set the flag to show the zoom controls, and it works. But then the user navigates to another activity, comes back to the map, and the zoom controls have gone.
Is there a simple way to ensure the zoom controls are always present, or do I need to roll my own on top? Ideally I want to set up the zoom controls in a subclass of MapView to keep things simple. I suspect it’s failing as the zoom controls are being set up at the wrong time, but when is the right time?
Here is what I do. First add a ZoomControl view to the file with your MapView (I am using a RelativeLayout to hold the MapView and ZoomControls)
Now in your onCreate method do something like