Navigation view handle back button on fragment
问题 Hi I need to handle back button on fragment. I using this navigation on my mobile apps. The question is how to handle back button when I open new fragment page? I try using below code on new fragment. actionBar.setDisplayShowHomeEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); But when click the back button , the navigation will be open. Any solution ? Thanks 回答1: As you know whenever user presses Back button you need to go to the previously loaded fragment and to do that try this