- 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
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
Clipping was used to clip navigation view and its children to a shape appearace. This is primarily useful when using a headerLayout that contains full bleed content that would obscure the top end corner shape. Material3 does not use as much imagery/color in the NavigationView header and disabling clipping by default is a nice performace improvement.
PiperOrigin-RevId: 513301639
The original logic prevents displaying the collapsed hint on top of suffix text. The behavior looks not consistent with the case of prefix text or outline variants of text fields.
This CL also fixes the issue that when drawable paddings are set on EditText, the collapsed hint is not aligned with the prefix anymore.
Resolves https://github.com/material-components/material-components-android/issues/2800
PiperOrigin-RevId: 511390069
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
When corner radius of a linear progress indicator is larger than 0, the behavior it's confusing because when the progress fraction is slightly larger than 0, the progress indicator will suddenly show with a width of twice the corner radius.
Fixes this by adjusting the indicator startX and endX correctly so the visible indicator length is always proportional to the progress.
Resolves https://github.com/material-components/material-components-android/issues/2940
PiperOrigin-RevId: 509552399
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
When backgroundTint is set against the AutoCompleteTextView, since the background drawable of it is a LayerDrawable, which will try to get the constant states of its child drawables and create new drawables from them.
In CutoutDrawable we didn't implement that logic - so the constant state returned will be MaterialShapeDrawableState, and therefore the new drawables created are plain MaterialShapeDrawables, instead of CutoutDrawable.
Fixes this by correctly implement drawable state for CutoutDrawable.
Resolves https://github.com/material-components/material-components-android/issues/3041
PiperOrigin-RevId: 508664043