Anonymous1 Anonymous1 - 5 months ago 16
Android Question

Android - don't refresh Google Maps v2 on rotation

When I rotate my device, Google Maps v2 refreshes. How do I prevent this refresh from occurring? I'm adding the map dynamically in a tab of a SherlockFragment.

Answer

I fixed the problem by adding to the Activity in AndroidManifest.xml:

android:configChanges="orientation|screenSize"