I press the navigation drawer, then if I press back button, the app exits rather than returning to the previous activity. If I change the xml file, then this problem doesn\'
ListView mDrawerList; @Override public void onBackPressed() { // TODO Auto-generated method stub if(mDrawerLayout.isDrawerOpen(mDrawerList)){ mDrawerLayout.closeDrawer(mDrawerList); }else{ super.onBackPressed(); } }