Before 1.12.0-alpha01 which was released on 6/7, BuildCompat#isAtLeastU() only returns true if API level is greater than 33 and the version running is a pre-release. Two things happened on 6/7 -- the version became a "platform stable" version, and core library version 1.12.0-alpha01 was released, which changes BuildCompat#isAtLeastU() to return true if the version is 34 and stable.
PiperOrigin-RevId: 540304068
Clients should prefer listening to back events using androidx.activity.OnBackPressedCallback which has been updated to forward BackEventCompat objects in androidx.activity:activity:1.8.0-alpha05. This updates component predictive back APIs to take in BackEventCompat objects instead of android.window.BackEvent objects to simplify usage - getting rid of the need for version checks and object conversions.
PiperOrigin-RevId: 540290323
When max height of BottomSheetBehavior is specified the calculations of top inset do not account for the max height parameter and may override internal `childHeight` variable used for inset calculation with parentHeight. This may cause top inset to be too small and end up letting BottomSheetBehavior content be scrolled above bottom of the screen (the content might end up "floating" above the bottom of the screen).
The CL ensures that overridden `childHeight` is coerced to a min value of parent or maxHeight parameter in cases when maxHeight was set.
PiperOrigin-RevId: 523126749
It wasn't an issue for modal bottom sheets because they dismiss the whole window when the bottom sheet behavior is hidden
Also updated Bottom App Bar demo drawer to opt into predictive back, which is a standard hideable bottom sheet
PiperOrigin-RevId: 520312905
- Enable predictive back by default for Bottom Sheet dialogs
- Update Catalog demo to enable predictive back for persistent/standard bottom sheet
PiperOrigin-RevId: 518896205
Note: android:windowSoftInputMode="adjustResize" is required in order for inset animation API to propagate the correct values, otherwise this is a no-op. This change also updates the M3 modal Bottom Sheet themes / theme overlays to use adjustResize by default (can still be overridden by the client).
PiperOrigin-RevId: 508351766
Custom actions need to be set directly on the focused child views to make talkback announce the existence of those actions correctly, despite that when you open custom action menu you can actually see they are being inherited from the parent view.
Makes BottomSheetBehavior be aware of the existence of accessibility delegate views, and update the custom actions on it when needed.
PiperOrigin-RevId: 478804858
It actually affects both swiping and setting the state programmatically. Removes the description regarding swiping to make it more accurate.
PiperOrigin-RevId: 452684555
Replace the usage of deprecated setSystemUiVisibility() with WindowCompat.setDecorFitsSystemWindows(). The original implementation will override any existing system visibility flags, so this CL also fixes the issue that certain existing system visibility settings like light navigation bar is reset.
Resolves https://github.com/material-components/material-components-android/issues/2582
PiperOrigin-RevId: 452075757
This CL fixes two issues regarding bottom sheet dialog status color adjustment in edge-to-edge mode:
1. Uses WindowInsetsControllerCompat to set status bar color to replace the deprecated way of setting flags, which cannot override the light/dark setting set by WindowInsetsControllerCompat.
2. Tracks Window change so the original status bar color can be updated when the dialog is re-shown. (The day/night mode can be changed when the dialog is hidden.)
Resolves https://github.com/material-components/material-components-android/issues/2168
PiperOrigin-RevId: 450463570