Skip to content
Snippets Groups Projects
Commit cfcd36f2 authored by goapunk's avatar goapunk
Browse files

Fix Contacts Item always beeing selected if Back is pressed in the NavMenu


Signed-off-by: default avatargoapunk <noobie@goapunks.net>
parent 47171f3e
No related branches found
No related tags found
No related merge requests found
......@@ -193,14 +193,14 @@ public class NavDrawerActivity extends BriarFragmentActivity implements
@Override
public void onBackPressed() {
// Check the Contacts item because we always return to Contacts here
NavigationView navigation = (NavigationView) findViewById(R.id.navigation);
navigation.getMenu().findItem(R.id.nav_btn_contacts).setChecked(true);
if (getSupportFragmentManager().getBackStackEntryCount() == 0
&& drawerLayout.isDrawerOpen(START)) {
drawerLayout.closeDrawer(START);
return;
}
// Check the Contacts item because we always return to Contacts here
NavigationView navigation = (NavigationView) findViewById(R.id.navigation);
navigation.getMenu().findItem(R.id.nav_btn_contacts).setChecked(true);
super.onBackPressed();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment