Android : Passing an instance of GoogleMap to another activity and keeping location + zoom

on Tuesday, December 9, 2014


I'm having a bit of a problem. I have an activity with a MapView fragment, I would like to launch another Activity but keep the map as is (position, zoom, bearing, tilt...). I have 2 questions:




  1. Should I use a Singleton for the map and use the same instance of it on every activity I need. Would that work?




  2. To be more precise, I have a MainActivity, the splash screen, that has a map in the background. When the user goes to Login Screen, I create a new activity but I would like to keep the map in the background. Do you HAVE to launch a new activity to go from one screen/view to another?




Thanks!


0 comments:

Post a Comment