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.
You can't, the map is getting refreshed because the Activity
is getting re-created on configuration changes (screen rotations...). You could prevent the rotation of the Activity
by using:
android:screenOrientation="landscape"
or
android:screenOrientation="portrait"
in the Manifest
file under your map Activity
.
and this way prevent it from being recreated on rotations.