I have an app which contains an activity which is a MapviewActivity and is mostly a mapview.
However I have noticed that the start up time of the activity is really slow and causes a lag from the moment the button is pressed to go in to the map activity. I feel this creates a bad user experience and would like to avoid this.
I have already set the background of the map activity to @null as suggested by one of the UI improvement articles on googles developer page, which I feel does not do the trick.
Is there a way to improve this? I would not like the main home screen to get stuck on the launch of the activity, even a transfer to the map activity and then loading the mapview would be better.
Thanks,
Jason
You could try removing the
MapViewfrom your layout. Then, inonCreate(), usepost()to schedule aRunnableto add in theMapViewand do your map-related initialization from Java. By usingpost()(or, potentially,postDelayed()) to postpone theMapViewfurther, you should be able to render the rest of the activity first.I haven’t tried this, so YMMV. 🙂