From ad2b5f8f8bba4d7ad44c26ba26d1036e2fd81144 Mon Sep 17 00:00:00 2001 From: dsn5ft <1420597+dsn5ft@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:49:49 -0700 Subject: [PATCH] [Docs][Predictive Back] Add note to clarify that automatic back handling in components is only for API 33+ Related to https://github.com/material-components/material-components-android/issues/3637 PiperOrigin-RevId: 574505672 --- docs/foundations/PredictiveBack.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/foundations/PredictiveBack.md b/docs/foundations/PredictiveBack.md index 3d395326fb4..0e644c7f7b6 100644 --- a/docs/foundations/PredictiveBack.md +++ b/docs/foundations/PredictiveBack.md @@ -58,6 +58,12 @@ animations: - [Side sheet](../components/SideSheet.md#predictive-back) (automatically for modal, standard and coplanar require integration) - [Navigation drawer](../components/NavigationDrawer.md#predictive-back) (automatically for `NavigationView` within `DrawerLayout`) +**Note:** The Material Components above only automatically handle back on API +Level 33+, and when the `android:enableOnBackInvokedCallback` manifest flag to +`true`. This is to be consistent with the behavior of other AndroidX and +Framework views, as well as to avoid taking precedence over any pre-existing +back handling behavior that has already been implemented by apps. + Future predictive back support is planned for the following Material Components: - Navigation bar / Bottom navigation view