Merge "Close the Drawer on BACK button if the Drawer is opened"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9e8d173786
@@ -702,6 +702,15 @@ public class SettingsActivity extends Activity
|
||||
return mFirstHeader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mDrawerLayout.isDrawerOpen(mDrawer)) {
|
||||
mDrawerLayout.closeDrawer(mDrawer);
|
||||
return;
|
||||
}
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackStackChanged() {
|
||||
setTitleFromBackStack();
|
||||
|
Reference in New Issue
Block a user