UdacityAndroidDevScholarship / gis-2k18

This application is a collaborative project made by the Google Udacity Android Developer Scholars.
49 stars 88 forks source link

Navigation bars selection inconsistent with the fragment on pressing back #121

Open sud8443 opened 6 years ago

sud8443 commented 6 years ago

The navigation drawer's items are not in sync with the fragments. When we press back from a fragment then the fragment from the back stack is loaded but the entry in the Navigation drawer is not updated also the same problem while navigating back from the My Profile activity. See the images below in the background HomeFragment is being shown while the Navigation drawer shows Challenges section is selected. last_issue_1 last_issue_2

PranavVyas commented 6 years ago

I think we can solve this with navigationView.getMenu().getItem(ID OF ITEM).setChecked(true)..but it works only if pressing back will go to specific fragment .say after going in profile fragment pressing back should go to home activity but something other has to be done here!