Going back to previous fragment not working correctly
问题 I am using a navigation drawer and when I select an item, it correctly replaces the previous fragment with the one I have selected, but if I open another one, and then click the back button, it goes to the previous activity instead of the previous fragment, what is wrong that it is doing this? private void selectItem(int position) { Fragment newFragment; FragmentTransaction transaction = getFragmentManager().beginTransaction(); switch (position){ case 0: //Update newFragment = new