Solved! Go to Solution.
//Retrieve the non-configuration instance data that was previously returned.
Object init = getLastNonConfigurationInstance();
if (init != null) {
map.restoreState((String) init);
} <activity android:name="YourMapActivity" android:configChanges="keyboardHidden|orientation">
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mMapView = (MapView) findViewById(R.id.map);
mMapView.addLayer(new ArcGISDynamicMapServiceLayer("" +"http://myserver/ArcGIS/rest/services/OK_GDKarta/MapServer"));
mMapView.addLayer(new ArcGISDynamicMapServiceLayer("" +"http://myserver/ArcGIS/rest/services/GDDynamic_EDIT/MapServer"));
graphicsLayer = new GraphicsLayer();
mMapView.addLayer(graphicsLayer);
Object init = getLastNonConfigurationInstance();
if (init != null) {
mMapView.restoreState((String) init);
}
}