Switch between Fragments and MapFragment with NavigationDrawer *FIXED*
问题 Problem Solved. Scroll further down! Im currently coding an app that has a Navigation Drawer. I want a map in one of the fragments. To switch between fragments in the navigation drawer i have this Switch case: private void displayView(int position) { // update the main content by replacing fragments Fragment fragment = null; switch (position) { case 0: fragment = new SupportMapFragment(); break; case 1: fragment = new PlacesFragment(); break; case 2: fragment = new LogbookFragment(); break;