Skip to content
Snippets Groups Projects
Commit 04323856 authored by akwizgran's avatar akwizgran
Browse files

Merge branch '782-wrong-item-selected-in-navdrawer-onBackPressed' into 'master'


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

Signed-off-by: default avatargoapunk <noobie@goapunks.net>

Closes #782

See merge request !438
parents 2b9ccb4c cfcd36f2
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