-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade DrawerLayout to 1.2.0 and simplify code (#4412)
The main benefit of upgrading to version 1.2.0 of `DrawerLayout` is ~~to properly support **predictive back animations**: when initiating a back gesture on API 33+, the DrawerLayout will animate automatically~~ to handle back navigation automatically. The predictive back animation of the menu however depends on `NavigationView` which is not used in the project. In addition to the upgrade, simplify DrawerLayout integration: - Forward key events to the DrawerLayout so it can intercept them and close itself when needed. - Don't handle the DrawerLayout closing manually using the `OnBackPressedCallback` anymore. This is not necessary since the back event will now be intercepted by the DrawerLayout when needed before reaching the `OnBackPressedDispatcher`. - Remove legacy fix for DrawerLayout staying open after Activity recreation.
- Loading branch information
Showing
2 changed files
with
12 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters