Added MainActivity.onBackPressed
This commit is contained in:
parent
acf735a050
commit
cdfc6c2f06
@ -99,6 +99,16 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||
updateUserInterface(getIntent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.main_drawer_layout);
|
||||
if (drawer.isDrawerOpen(GravityCompat.START)) {
|
||||
drawer.closeDrawer(GravityCompat.START);
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
Loading…
Reference in New Issue
Block a user