Skip to content

Commit

Permalink
[Predictive Back][NavigationView] Fix issue where predictive back is …
Browse files Browse the repository at this point in the history
…not enabled in NavigationView after rotating the screen or restarting the activity when the NavigationView is already opened as a drawer

Resolves #3593

PiperOrigin-RevId: 569181523
  • Loading branch information
dsn5ft committed Oct 2, 2023
1 parent 1252d4f commit bccbd4f
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -448,6 +448,10 @@ protected void onAttachedToWindow() {
// Make sure there's only ever one listener
drawerLayout.removeDrawerListener(backDrawerListener);
drawerLayout.addDrawerListener(backDrawerListener);

if (drawerLayout.isDrawerOpen(this)) {
backOrchestrator.startListeningForBackCallbacksWithPriorityOverlay();
}
}
}

Expand Down

0 comments on commit bccbd4f

Please sign in to comment.