Android navigation drawer layout menu item fragments not getting added to back stack #62691
-
Select Topic AreaQuestion Body0 I've got a bug that I think may be unsolvable. I'm not sure what I am doing wrong; and I suspect that perhaps I am not doing things in the correct, 'android' way. I have a single activity app with multiple fragments and a drawerlayout & bottomnavigationview layout. I also have a settings toolbar icon on the right of the toolbar. Here is the view enter image description here enter image description here The bottomnavigationview works fine with the settings icon. The problem is that when you navigate using the drawerlayout menu the fragment transaction is not added to the backstack. So when you navigate to settings from one of the drawerlayout items and then you click on the back icon it takes you back to the first page; not the correct drawerlayout navigation item you were currently on. I saw in another post that I should use menucategory="second" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
0 The problem was I wasn't using the AppBarConfiguration correctly. I copied from a sample and I didn't read documentation properly! The id's for the AppConfigurationBar configuration are for the items that need a back button instead of hamburger icon. Serves me right for not reading documentation :-) |
Beta Was this translation helpful? Give feedback.
0
The problem was I wasn't using the AppBarConfiguration correctly. I copied from a sample and I didn't read documentation properly! The id's for the AppConfigurationBar configuration are for the items that need a back button instead of hamburger icon.
Serves me right for not reading documentation :-)