Skip to content

Comments

[Navigation Material] Ensure Navigation Material properly handles back for nested nav#1736

Merged
jbw0033 merged 1 commit intogoogle:mainfrom
jbw0033:material_back
Dec 20, 2023
Merged

[Navigation Material] Ensure Navigation Material properly handles back for nested nav#1736
jbw0033 merged 1 commit intogoogle:mainfrom
jbw0033:material_back

Conversation

@jbw0033
Copy link
Collaborator

@jbw0033 jbw0033 commented Dec 20, 2023

If there is a nested NavGraph under the current bottomSheet destination and you do a back press, instead of the bottomSheet which is the topmost destination being popped, the nested NavHost underneath will be popped instead. This is caused by bottomSheet not properly intercepting back presses.

This change added a BackHandler to ensure that bottomSheets correctly respect the system back hierarchy for back events.

Fixes: #1726

If there is a nested NavGraph under the current bottomSheet destination
and you do a back press, instead of the bottomSheet which is the topmost
destination being popped, the nested NavHost underneath will be popped
instead. This is caused by bottomSheet not properly intercepting back presses.

This change added a BackHandler to ensure that bottomsheets correctly
respect the system back hierarchy for back events.

Fixes: google#1726
@jbw0033 jbw0033 self-assigned this Dec 20, 2023
@jbw0033 jbw0033 enabled auto-merge December 20, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Navigation Material] Incorrect back behavior with nested navigator

2 participants