3045 Commits

Author SHA1 Message Date
pekingme
dfbf4d9c2c [Cleanup] Minor fix.
PiperOrigin-RevId: 519997026
2023-03-28 16:19:46 +00:00
raajkumars
cdda1fc66e [Search] Added support to pass toolbar style.
PiperOrigin-RevId: 519876161
2023-03-28 16:18:25 +00:00
rightnao
fc0de1ba24 [Badge] Center badge content more correctly
PiperOrigin-RevId: 519835048
2023-03-28 16:14:53 +00:00
pekingme
30ea33e948 [Datepicker] Integrated tokens.
PiperOrigin-RevId: 519201395
2023-03-24 19:24:16 +00:00
pekingme
5f542c8946 [TimePicker] Made dialog container color configurable in xml style.
PiperOrigin-RevId: 519184711
2023-03-24 18:08:08 +00:00
dsn5ft
d6fad952c6 [Predictive Back][Bottom Sheet] Update Bottom Sheet to support predictive back
- Enable predictive back by default for Bottom Sheet dialogs
- Update Catalog demo to enable predictive back for persistent/standard bottom sheet

PiperOrigin-RevId: 518896205
2023-03-23 18:15:27 +00:00
pekingme
0be665cfc0 [Tokens] Updated to v0.162 for a new target.
PiperOrigin-RevId: 518680159
2023-03-23 18:14:41 +00:00
rightnao
8499b83ba1 [BadgeDrawable] Add padding in between top and bottom edges of badge and text
PiperOrigin-RevId: 518370027
2023-03-21 20:50:42 +00:00
Material Design Team
206a4684fd [M3][Color] Color component internal update
PiperOrigin-RevId: 518068669
2023-03-20 21:26:33 +00:00
afohrman
78fa15748f [Side Sheet] Added LeftSheetDelegate and left sheet support for standard and coplanar side sheets.
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
2023-03-20 21:25:55 +00:00
hunterstich
93ceb7edee [Carousel] Add support for transitions by forcing canvas clipping when detaching from the window.
PiperOrigin-RevId: 517963541
2023-03-20 21:24:55 +00:00
pekingme
9f1caa2c64 [Tokens] Upgraded to v0.162.
PiperOrigin-RevId: 517446114
2023-03-20 21:23:07 +00:00
hunterstich
0a0bff1489 Automated g4 rollback of changelist 515410464
PiperOrigin-RevId: 517409678
2023-03-20 21:21:59 +00:00
dsn5ft
2c297faf4b [Predictive Back][Navigation Drawer] Infrastructure for back handling in components + Navigation Drawer predictive back support
- Added MaterialBackHandler interface and MaterialBackOrchestrator class
- Implemented animations in MaterialSideContainerBackHelper for NavigationView when DrawerLayout parent

PiperOrigin-RevId: 517399606
2023-03-20 21:10:22 +00:00
pekingme
93f386c9f6 [Tokens/Color] Added U color resources for contrast mode support.
PiperOrigin-RevId: 517236590
2023-03-20 21:08:12 +00:00
hunterstich
43c507775f [Carousel] Updated MaskableFrameLayout to use Outline path clipping on 33+ only.
PiperOrigin-RevId: 517128236
2023-03-16 15:26:15 +00:00
hunterstich
3f993923b2 [NavigationRailView] Added attribute to control the application of start window inset padding.
PiperOrigin-RevId: 516904093
2023-03-15 21:10:53 +00:00
conradchen
d6f36e89e2 [FAB] Correctly handle min touch target size
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
2023-03-14 22:12:22 +00:00
hunterstich
3856af1b65 [Carousel] Updated setForceCompatClipping visibility for testing.
PiperOrigin-RevId: 516584087
2023-03-14 22:09:22 +00:00
hunterstich
733c9e08c2 [Carousel] Updated MaskableFrameLayout to clip more performantly.
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
2023-03-13 21:21:48 +00:00
hunterstich
0c62df4a60 Automated g4 rollback of changelist 515343383
PiperOrigin-RevId: 515410464
2023-03-13 21:20:02 +00:00
Material Design Team
ea6b514d00 [M3][Color] Internal color updates
PiperOrigin-RevId: 515348671
2023-03-13 21:18:35 +00:00
hunterstich
1d2a59ba37 [NavigationRail][NavigationBar] Fixed active item focused state color not being visible.
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
2023-03-13 21:17:13 +00:00
hunterstich
359580b6c1 [Carousel] Changed Maskable.add/removeOnMaskChangedListener to Maskable.setOnMaskChangedListener.
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
2023-03-08 21:30:15 +00:00
dsn5ft
2702b1a8d5 [Chip] Fix hand pointer icon not showing up on whole Chip when using mouse input
PiperOrigin-RevId: 513621349
2023-03-03 16:26:47 +00:00
hunterstich
9d0732be9e [Carousel] Fixed child index bug causing items to be ordered incorrectly.
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
2023-03-03 16:25:30 +00:00
hunterstich
e3b493f5eb [NavigationView] Removed canvas clipping by default and added an option to enabled/disable manually
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
2023-03-01 23:08:28 +00:00
rightnao
2ea3df991f [BottomAppBar] Fix issue with pre-21 FAB elevation/shadow sometimes appearing
resolves https://github.com/material-components/material-components-android/issues/3266

PiperOrigin-RevId: 513039097
2023-03-01 23:06:46 +00:00
dsn5ft
5689ce2608 [i18n] Update string translations
PiperOrigin-RevId: 513006191
2023-02-28 22:08:20 +00:00
Material Design Team
e58d1086bc [M3][Color] Internal Color updates
PiperOrigin-RevId: 512943029
2023-02-28 22:07:36 +00:00
rightnao
21a7aff545 [AppBarLayout] Fix bug in AppBarLayout that refreshes all its children's drawables instead of just its own
Resolves https://github.com/material-components/material-components-android/issues/3233

PiperOrigin-RevId: 512678371
2023-02-27 20:48:34 +00:00
Material Design Team
d8c01c1859 [BottomSheetBehavior] Ignore ACTION_MOVE events in BottomSheetBehavior that weren't preceded by an ACTION_DOWN event.
PiperOrigin-RevId: 512670230
2023-02-27 20:47:48 +00:00
rightnao
68c844c91d [Badge] Integrating tokens
PiperOrigin-RevId: 512186562
2023-02-27 20:47:02 +00:00
rightnao
2ddcfe46b7 [Badge] Add shape appearance for badges
PiperOrigin-RevId: 512137782
2023-02-27 20:46:06 +00:00
rightnao
34d6a14700 [TabLayout] Fix issue with indicator not being drawn when viewpager starts scrolling before onLayout is called
PiperOrigin-RevId: 512062664
2023-02-27 20:45:19 +00:00
pfthomas
4032a74112 [MaterialDatePicker] Fix keyboard not showing at first in text input mode
Resolves https://github.com/material-components/material-components-android/issues/2747

PiperOrigin-RevId: 511501130
2023-02-23 03:46:22 -08:00
conradchen
d9b97b42ff [TextField] Make collapsed hint aligned with prefix and suffix text
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
2023-02-23 03:45:40 -08:00
conradchen
33e4f841b2 [Catalog][Menu] Fixes context menu are not themed on S
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
2023-02-23 03:45:00 -08:00
pubiqq
fd0c81531c [Chip] Add theme overlays supported on API < 23
Resolves https://github.com/material-components/material-components-android/pull/3245

GIT_ORIGIN_REV_ID=d1cb53cbd4d8ae8ae1fc97d4599c4d2fceea71a8
PiperOrigin-RevId: 511250546
2023-02-22 11:00:58 -08:00
hunterstich
112a0bd20e [Carousel] Restricted MultiBrowseCarouselStrategy's forceCompactArrangement constructor.
This parameter is experimental and planning to be removed in the future.

PiperOrigin-RevId: 510211297
2023-02-17 04:51:36 -08:00
pubiqq
abd1d1c802 [Snackbar] Fix the snackbar position when the anchor view layout listener is enabled
Resolves https://github.com/material-components/material-components-android/pull/3211
Resolves: https://github.com/material-components/material-components-android/issues/3194

GIT_ORIGIN_REV_ID=ef12e5c4f6c6ec49287a472ba1243c20cc2ac979
PiperOrigin-RevId: 509892239
2023-02-17 04:51:00 -08:00
hunterstich
6166e73d36 [Carousel] Implemented smoothScrollToPosition
PiperOrigin-RevId: 509873609
2023-02-17 04:32:27 -08:00
conradchen
0ce6ae458f [ProgressIndicator] Fix linear progress indicator with corner radius
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
2023-02-15 10:32:05 -08:00
pubiqq
e06a11982b [Internal] Add compat method to get the screen size
Resolves https://github.com/material-components/material-components-android/pull/3221

GIT_ORIGIN_REV_ID=9323e23689386561d38b0c8c73114e0db7a30557
PiperOrigin-RevId: 509548792
2023-02-15 10:25:53 -08:00
hunterstich
b3f32d42a0 [TopAppBar] Added app:layout_scrollEffect to public attributes.
PiperOrigin-RevId: 509484463
2023-02-15 10:21:30 -08:00
hunterstich
bdf73bf54a [Carousel] Minor javadoc working fixes
PiperOrigin-RevId: 509185650
2023-02-13 13:28:29 +00:00
conradchen
184be8a879 [Build] Internal change
PiperOrigin-RevId: 508758212
2023-02-10 23:33:46 +00:00
hunterstich
220415d3c1 [Carousel] Fixed scroll offset calculation error when last focal keyline comes after the last child
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
2023-02-10 22:52:03 +00:00
hunterstich
795979c283 [Carousel] Fixed MultiBrowseCarouselStrategy method visibility.
PiperOrigin-RevId: 508728594
2023-02-10 22:51:19 +00:00
conradchen
25b3c2b15c [TextField] Fix cutout not working when backgroundTint is set
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
2023-02-10 16:20:37 +00:00