Saving MapFragment (Maps v2) State in Android
I'm working with the new GoogleMaps API (v2) and have some problems with the fragment. I have two fragments in my app (Map, List) and the user can switch between them. Works fine so far with this code: if (itemPosition == 0) { getSupportFragmentManager().beginTransaction() .replace(R.id.fragmentpos, myMapFragment).commit(); } else if (itemPosition == 1) { getSupportFragmentManager().beginTransaction() .replace(R.id.fragmentpos, myListFragment).commit(); }...... When I work with the map, switch to the list fragment and then back to the map fragment, the last position of the map is not saved.