Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
This has been fixed internally in https://android-review.googlesource.com/843760 and will be available in 1.0.0-alpha09 - NavigationUI now looks at the menuCategory of the MenuItem to determine if it should pop to the start destination of the graph. By adding menuCategory="secondary" to your MenuItem, you can avoid popping the back stack.
ma...@marcardar.com <ma...@marcardar.com> #3
Excellent, thanks very much for the early xmas present!
Description
Version used: 1.0.0-alpha07
Devices/Android versions reproduced on: Android 8.1
This is a feature request.
In my Nav drawer I have a Settings item. Currently, using the Nav Architecture component, clicking this causes the current back stack to be popped up to (not including) the start destination, and then the Settings fragment is added on top of that. I would like to be able to customise this so that the pop does not occur - i.e. that the Settings fragment is simply placed on top of the current destination. Anyway, isn't this what the user would expect for a Settings screen?
The key method call seems to be on the second line of NavigationUI.setupWithNavController() where popUp = false is passed. Maybe whether to popUp or not could be specified in the nav_graph destination?