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
When filling the RecyclerView, views need to be added at the correct index (either begginning or end) depending on the direction of fill.
PiperOrigin-RevId: 513510079
* Music player controls expands to take the place of the title area by updating constraints to tie both view groups to the bottom of the album art.
* Fixed container transform activity scrolling bug caused by window.setSharedElementsUseOverlay. Removed this as it has no effect on the demo.
* Fixed shared axis fragment end layout not animating by setting the end fragments transition name on the root scroll view instead of the scroll view's inner layout
* Added insets to shared axis controls to be visible above the navigation bar when in edge-to-edge mode
Resolves https://github.com/material-components/material-components-android/issues/3247
PiperOrigin-RevId: 511764274
On S, it seems like the framework has a different behavior of applying themes/styles on the decor view theme. Catalog's theme overlay applying logic didn't take care of the implication of the decor view theme, somehow this causes the Material themes are not applied to decor views at all, when a theme overlay is applied.
We've solved the similar issue with the dynamic color implementation. Applies the same fix on catalog to fix this issue.
Resolves https://github.com/material-components/material-components-android/issues/2682
PiperOrigin-RevId: 511254476
Calculating end scroll offset was using the distance between the last child and the last focal keyline. When the last child came before the last keyline, an unexpected scroll offset was returned. This also adds a dropdown to the catalog demo to allow setting the number of items in the carousel.
PiperOrigin-RevId: 508739119
By default bottom sheets will add paddings at the bottom of its content to account for the navigation bar insets in edge-to-edge mode. However in the case of bottom sheet with a scrollable content, this actually creates inconsistent or at its best confusing behavior - with a plain bottom sheet, the content will be shown behind the navigation bar if you can still scroll down, but with scrollable content, whenever the bottom sheet is fully expanded, the bottom padding shows and cut the scrollable content.
It's debatable which behavior is better. But in our catalog demo I feel we can demonstrate how to do that if clients prefer a less confusing behavior, i.e., only when there's no more content to scroll, the bottom padding shows.
Resolves https://github.com/material-components/material-components-android/issues/3173
PiperOrigin-RevId: 508468196
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
This removes CenteredCarouselConfigration and its superclass MultibrowseCarouselConfiguration and renames StartCarouselConfiguration to MultiBrowseCarouselConfiguration.
PiperOrigin-RevId: 506424085
Added logic for an innerMargin to SideSheetBehavior and delegates and incorporated innerMargin into the sheet offset calculations to account for the extra spacing and avoid a jump when dragging the sheet to STATE_EXPANDED.
Also added a colored background to the catalog demo in order to see the corners of the sheet.
PiperOrigin-RevId: 495701453
The coplanar sheet catalog demo was missing an explicit style definition, which was causing some attributes like the background to display improperly.
PiperOrigin-RevId: 494217653