3083 Commits

Author SHA1 Message Date
dsn5ft
1c01e82297 [Bottom Sheet] Update expanded corner removal to check if sheet view is actually at top of screen
PiperOrigin-RevId: 524275157
2023-04-17 12:16:37 -07:00
Material Design Team
884a4541e2 [Search] Support stylus handwriting in SearchBar
PiperOrigin-RevId: 524098693
2023-04-17 12:16:03 -07:00
rightnao
206928b8f9 [Snackbar] Integrate container color token
PiperOrigin-RevId: 524075181
2023-04-17 12:15:26 -07:00
Kavita Patil
35bd1fc98f [Date Picker] ContentDescription for "DayName" is not properly getting read by talkback for the German language
Resolves https://github.com/material-components/material-components-android/pull/3051

GIT_ORIGIN_REV_ID=91b350bf4830f5903d4809a1c3b097bbec2c2b27
PiperOrigin-RevId: 524068644
2023-04-17 12:14:49 -07:00
raajkumars
3029ff0fc4 Automated g4 rollback of changelist 523789226
PiperOrigin-RevId: 524046939
2023-04-17 12:12:17 -07:00
conradchen
532b65d008 [Badge] Fix crash caused by non-ascii strings
PiperOrigin-RevId: 523793683
2023-04-13 09:09:49 -07:00
pubiqq
619d5a6cad [DatePicker] Fix time zone when custom text input format is set
Resolves https://github.com/material-components/material-components-android/pull/3338

GIT_ORIGIN_REV_ID=bb3760f22753b10608d5bd1b342b5b063b3276bb
PiperOrigin-RevId: 523792669
2023-04-13 09:06:29 -07:00
raajkumars
9ffaa8d1bf [M3][Search] Updated search styles to set the default style attributes in the related theme overlay.
PiperOrigin-RevId: 523789226
2023-04-13 09:05:53 -07:00
pubiqq
4d50aa41e7 [Badge] Badge cleanup/fixes:
- Allow single digit badges to be non-circular if the label text is too big horizontally.
- Change maxCharacterCount to truncate both strings and numbers, and add new attribute maxNumber to truncate only numbers
- Updated maxCharacterCount so that if it doesn't exist, it does not truncate instead of defaulting to a value

Resolves https://github.com/material-components/material-components-android/pull/3321

GIT_ORIGIN_REV_ID=a8f5866eef5ffd4d949b8c6d7f1451b563536a6e
Co-authored-by: imhappi
PiperOrigin-RevId: 523453145
2023-04-13 09:05:14 -07:00
dsn5ft
69b5386e4b [Predictive Back] Make back helpers support generified View type
PiperOrigin-RevId: 523442268
2023-04-13 09:03:37 -07:00
pekingme
77cdc1e3ac [Dialog] Made dialog background color configurable in XML styles.
PiperOrigin-RevId: 523436908
2023-04-12 07:38:27 -07:00
conradchen
23a2b17355 [Switch] Fix morphing time of switch thumbs
The switch thumb position animation time is hard-coded by SwitchCompat and we have no way to override it. Therefore, the morphing time has to follow the position animation time, instead of the design spec.

Resolves https://github.com/material-components/material-components-android/issues/3340

PiperOrigin-RevId: 523415316
2023-04-11 20:47:59 -07:00
rightnao
e708d98c74 [TabLayout] Re-adding mistakenly removed tab layout theme
PiperOrigin-RevId: 523239345
2023-04-11 20:47:24 -07:00
rightnao
b706506c3d [Badge] Add attribute to automatically adjust badge so that it is within the anchor view's grandparent view's bounds
PiperOrigin-RevId: 523171594
2023-04-11 20:00:06 -07:00
pekingme
a4c65d86d3 [SideSheet] Fixed container color assigned to incorrect attribute.
Should be `app:backgroundTint` not `android:background`.

PiperOrigin-RevId: 523147016
2023-04-11 19:59:04 -07:00
Material Design Team
0a4e419242 Automated g4 rollback of changelist 522443049
PiperOrigin-RevId: 523143316
2023-04-11 19:57:22 -07:00
Material Design Team
9c4b73da3a [BottomSheetBehavior] Fix for detached from bottom sheet behavior.
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
2023-04-11 19:55:56 -07:00
pubiqq
7bc26e5070 [Carousel] Fix item masking for API 21
Resolves https://github.com/material-components/material-components-android/pull/3330

GIT_ORIGIN_REV_ID=1c46e2882b074e35ab1f19af0af00f88dee84f4c
PiperOrigin-RevId: 523119333
2023-04-11 19:55:10 -07:00
dsn5ft
176ce5e5f0 [Predictive Back][Search] Add ability to opt-out of back handling
PiperOrigin-RevId: 522626762
2023-04-10 15:06:53 +00:00
raajkumars
203d5ec3a3 [M3][Search] Improve performance by preventing item change notifications during inflation.
PiperOrigin-RevId: 522612855
2023-04-10 15:05:58 +00:00
hunterstich
0184b5baa9 [Carousel] Updated MultiBrowseCarouselStrategy to find best arrangments using a cost function
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
2023-04-10 15:03:52 +00:00
pekingme
cf006c5e10 [Search] Made SearchBar and SearchView's container colors configurable in XML style.
PiperOrigin-RevId: 522468493
2023-04-10 15:03:01 +00:00
pekingme
303fabd331 [Dialog] Made dialog background color configurable in XML styles.
PiperOrigin-RevId: 522443049
2023-04-10 14:57:51 +00:00
pekingme
5e427da912 [SideSheet] Removed the hasValue check for shapeAppearance to guarantee it always has a user value or default value to avoid NPE.
Resolves https://github.com/material-components/material-components-android/issues/3322

PiperOrigin-RevId: 522114031
2023-04-10 14:52:51 +00:00
pfthomas
ec511a54cf [MaterialDatePicker] Update screen width at which days size is 48dp in portrait mode.
PiperOrigin-RevId: 521476833
2023-04-10 14:42:10 +00:00
leticiars
c598ccd51e [TextInputLayout] Added API to set cursor colors for API 28+.
This is useful if the cursor color should be set in runtime, where setting ?attr/colorControlActivated for the edit text is not possible. Using the added APIs will take precedence over the value of ?attr/colorControlActivated.

This API is limited to APIs 28+ due to the framework getTextCursorDrawable() method being 28+.

Resolves https://github.com/material-components/material-components-android/issues/3255
Resolves https://github.com/material-components/material-components-android/issues/3311

PiperOrigin-RevId: 521448134
2023-04-10 14:23:58 +00:00
rightnao
a0d0b53472 [Badge] Add getters/setters for vertical and horizontal badge padding
PiperOrigin-RevId: 520969935
2023-03-31 18:35:53 +00:00
pekingme
d722a782bc [Tokens] Upgraded outdated token output in textfield & appbar.
PiperOrigin-RevId: 520714140
2023-03-30 21:58:22 +00:00
pekingme
4c5b917609 [Tokens] Internal migration.
PiperOrigin-RevId: 520708971
2023-03-30 21:56:43 +00:00
dsn5ft
5a37e4b35f [Gradle] Update to AGP 7.4.2 to get latest lint and fix Android U lint issues
PiperOrigin-RevId: 520691813
2023-03-30 18:15:24 +00:00
dsn5ft
a4b6f46f0c [Predictive Back][Search] Update SearchView to support predictive back when set up with SearchBar
PiperOrigin-RevId: 520613990
2023-03-30 16:35:21 +00:00
pekingme
b3f7b6604e [AppBarLayout] Fixed dragging the app bar layout overshoots the status bar.
Resolves https://github.com/material-components/material-components-android/issues/3316

PiperOrigin-RevId: 520466126
2023-03-30 15:55:50 +00:00
pubiqq
c1ef52b8ea [Badge] Allow text strings in badges
Resolves https://github.com/material-components/material-components-android/pull/2978
GIT_ORIGIN_REV_ID=39c9f60cff607fba1e9ca57ae8bc155c5919e503
Co-authored-by: imhappi
PiperOrigin-RevId: 520368686
2023-03-29 19:18:22 +00:00
dsn5ft
2c23d2a158 [Predictive Back][Bottom Sheet] Fix bug where standard hideable bottom sheets don't stay hidden after predictive back
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
2023-03-29 19:16:12 +00:00
raajkumars
11599231a9 [M3][Search] Fixed a crash in search components when view attributes inspection dev setting is turned on.
PiperOrigin-RevId: 520131513
2023-03-29 19:05:42 +00:00
pekingme
7b2c19b273 [DatePicker] Made dialog container color configurable in xml style.
PiperOrigin-RevId: 520113790
2023-03-29 19:04:50 +00:00
leticiars
62aa802f6c [Checkbox] Fixed checkmark icon not updating color on error correctly in pre 21.
Issue happened on checkboxes that switched from unchecked to checked and later to be on error state.

Fixes https://github.com/material-components/material-components-android/issues/3302

PiperOrigin-RevId: 520088272
2023-03-29 19:03:57 +00:00
pfthomas
bcc97bfaf5 [MaterialDatePicker] Fix hint for Korean
PiperOrigin-RevId: 520025180
2023-03-28 16:20:46 +00:00
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