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
This changes the way arrangements are found by:
* Finding all possible arrangements of items
* Sort the arrangement candidates using a cost function that optimizes for total space fit, large item size retention, and adherence to other input params
* Fit and use the top arrangement to work within the carousel's available space
PiperOrigin-RevId: 522568015
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
Standard and coplanar side sheets now support sliding and dragging from the left side, as well as automatic RTL mirroring when `layout_gravity` is set to `start` or `end`. Change the sheet edge by setting `layout_gravity` on the side sheet view in XML or programmatically.
PiperOrigin-RevId: 518048965
- Added MaterialBackHandler interface and MaterialBackOrchestrator class
- Implemented animations in MaterialSideContainerBackHelper for NavigationView when DrawerLayout parent
PiperOrigin-RevId: 517399606
In the original logic we only handle touching down events happening within the "actual" button area, which breaks the min touch target size enforcement. Fixes this by calculating the correct area of touch target when handling touching down events.
PiperOrigin-RevId: 516600706
Clipping is now handled differently depending on the shape being used and API level.
* 30+ always uses a ViewOutlineProvider
* 21+ uses a ViewOutlineProvider when the shape is a round rect
* All other API levels and cases fall back to canvas clipping
PiperOrigin-RevId: 516297199
The color state list used for the ripple to indicate focal/hover state was being set as the background of an item and being obscured by the active indicator. It is now the foreground and visible on top of the active indicator.
PiperOrigin-RevId: 515343383
This change is to prevent the case of items in a RecyclerView.Adapter being recycled and re-bound and having more and more listeners added to a MaskableFrameLayout.
PiperOrigin-RevId: 515048125