Answer the question
In order to leave comments, you need to log in
How to save the zoom of the map and restore the zoom values when returning to the map?
There are two activities: the first is a map, the second is just an empty activity. The scenario is as follows: they twisted, moved the map (the first activity), pressed the button - they switched to the second activity. Next, click on the cross in the second activity, which Intent returns us to the first activity to the map. But I would like to return to the same point on the map and with the same zoom. How to implement it correctly? Whereby?
There is no problem returning the same point. But how to save the zoom of the map and restore the zoom values when returning to the map?
Answer the question
In order to leave comments, you need to log in
It is necessary to return back not by intent, but by calling finish (). Most likely this will solve your problem. And on one instance, you can save the state in onSaveInstanceState
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question