Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 20, 2023

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 merged commit e3a027c into google:main Dec 20, 2023
9 checks passed
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