2957 Commits

Author SHA1 Message Date
Material Design Team
a3af01ce79 Automated g4 rollback of changelist 528599594
PiperOrigin-RevId: 528735653
2023-05-02 16:13:39 -04:00
dsn5ft
2a1a67f076 [Color] Temporarily remove v34 Android U color references which could be causing resource NotFoundExceptions
PiperOrigin-RevId: 528599594
2023-05-02 16:12:29 -04:00
pekingme
1562d0b64f [ExposedDropdownMenu] Added attribute to set dropdown menu's container.
PiperOrigin-RevId: 528578402
2023-05-02 16:10:48 -04:00
afohrman
5ba704a273 [Predictive Back] [Side Sheet] Added updateBackProgress() predictive back support for coplanar side sheets.
Before this change, coplanar sheets responded to the sheet during finishBackProgress(), in handleBackInvoked(). After this change, coplanar sheets respond to the back progress while the predictive back event is in progress, in updateBackProgress().

PiperOrigin-RevId: 528470353
2023-05-01 10:53:53 -04:00
afohrman
b984e64445 [Predictive Back] [Side Sheet] Added handleBackInvoked() predictive back support for coplanar side sheets.
Added an AnimatorUpdateListener that runs in finishBackProgress() to make the coplanar sibling's margins update as the sheet slides back to its origin edge.

PiperOrigin-RevId: 527749916
2023-04-28 14:46:43 -04:00
pekingme
824d75e773 [Color] Fixed lint error.
PiperOrigin-RevId: 527739167
2023-04-28 14:46:02 -04:00
afohrman
8ae8a3791a [Side Sheet] Fixed side sheet swipe calculations in RightSheetDelegate.
These changes fix a bug for coplanar predictive back, where a sheet hide was triggered every time a predictive back swipe was started on a right coplanar sheet, rather than allowing the predictive back swipe.

PiperOrigin-RevId: 527681485
2023-04-28 14:45:04 -04:00
Material Design Team
a6cf0985c4 [M3][Color] Added ColorContrast API
PiperOrigin-RevId: 527645245
2023-04-27 16:39:34 -04:00
hunterstich
c031144d26 [NavigationView] Updated NavigationView to use ViewOutlineProvider to handle corner clipping when possible and remove drawerLayoutCornerClippingEnabled attribute.
PiperOrigin-RevId: 527633449
2023-04-27 16:38:17 -04:00
dsn5ft
52f1737dd8 [Predictive Back][Side Sheets] Fix subtle detached side sheet glitch where after predictive back the sheet does not fully slide off screen
PiperOrigin-RevId: 527577382
2023-04-27 16:37:18 -04:00
afohrman
f335a50907 [Predictive Back][Side Sheet] Added predictive back support for modal side sheets.
PiperOrigin-RevId: 527334991
2023-04-26 16:21:39 -04:00
afohrman
562285e051 [Predictive Back][Side Sheet] Added predictive back support for standard side sheets.
PiperOrigin-RevId: 527326750
2023-04-26 16:20:46 -04:00
pfthomas
29b59c21f5 [MaterialDatePicker] Add getTextColor to DayViewDecorator
PiperOrigin-RevId: 527265648
2023-04-26 16:19:16 -04:00
pekingme
6980c40f12 [TopAppBar] Updated to take a CSL as the AppBarLayout background color.
PiperOrigin-RevId: 527090028
2023-04-26 16:18:09 -04:00
pubiqq
2e85f06247 [MaterialSwitch] Add support for setting thumb icon size
Resolves https://github.com/material-components/material-components-android/pull/2960

GIT_ORIGIN_REV_ID=8af4d0f06e98f4ffced715b2dcde78d7186e1afb
PiperOrigin-RevId: 526984037
2023-04-25 17:08:20 -04:00
afohrman
d0ad45e1a1 [Side Sheet] Added left/start modal sheet.
Sheet gravity is intended to be set once at setup before the sheet is shown; sheet gravity changes are not supported at runtime and will cause an IllegalStateException.

Also refactored modal sheet demo to recreate the sheet every time it's shown, which allows the sheet gravity changes to take effect for modal sheets.

PiperOrigin-RevId: 526957847
2023-04-25 17:07:13 -04:00
pubiqq
44a97f4a83 [Badge] Fix table formatting and remove unnecessary badge invalidation
Resolves https://github.com/material-components/material-components-android/pull/3356

GIT_ORIGIN_REV_ID=9f6839aa225d567a26a7db948734c28a1bbae44a
PiperOrigin-RevId: 526735605
2023-04-25 17:06:16 -04:00
Material Design Team
b335436cf2 [M3][Color] Updated content-based dynamic with contrast levels
PiperOrigin-RevId: 526722393
2023-04-24 15:31:21 -04:00
pfthomas
f4d0f5653a [MaterialDatePicker] a11y/i18n alignment
Resolves https://github.com/material-components/material-components-android/issues/3343

PiperOrigin-RevId: 526657661
2023-04-24 15:30:28 -04:00
rightnao
fdaff78506 [TopAppBar] Removing keyboard scroll event workaround for AppBarLayout since CoordinatorLayout issue has been fixed in androidx.core:core:1.10.0
Resolves https://github.com/material-components/material-components-android/issues/2249

PiperOrigin-RevId: 525775019
2023-04-24 15:29:47 -04:00
rightnao
3b2b827597 [NavigationRail] Integrate tokens and add shapeAppearance attribute
PiperOrigin-RevId: 525551069
2023-04-24 15:28:56 -04:00
dsn5ft
9405121f62 [Predictive Back] Update side container back helper to support containers with arbitrary child views
PiperOrigin-RevId: 525466973
2023-04-19 14:12:04 -07:00
pekingme
5da4c02176 [M3][Color] Color Internal Update
PiperOrigin-RevId: 525254468
2023-04-19 14:11:14 -07:00
Material Design Team
3ed7f7751c [M3][Color] Internal Utilities library update
PiperOrigin-RevId: 525206741
2023-04-19 14:09:40 -07:00
Material Design Team
1fd695c72a [M3][Color] Code style update
PiperOrigin-RevId: 525194182
2023-04-19 14:08:40 -07:00
rightnao
86cd9d70bf [BottomSheet] Integrate tokens
PiperOrigin-RevId: 525177708
2023-04-19 13:55:04 -07:00
dsn5ft
c8a0d47825 [Bottom Sheet] Add method to allow programmatically changing shouldRemoveExpandedCorners behavior
PiperOrigin-RevId: 525155162
2023-04-19 13:54:32 -07:00
raajkumars
e56e9b1dde [M3][Search] Fix Search view prefix style.
PiperOrigin-RevId: 524945100
2023-04-19 13:53:58 -07:00
rightnao
7bd9724078 [BottomNavigationView] Integrate tokens and add shape appearance support
PiperOrigin-RevId: 524919091
2023-04-19 13:53:26 -07:00
Michael Shafrir
d29ed38f5a [Internal] Guard against NPE in ManufacturerUtils
Resolves https://github.com/material-components/material-components-android/pull/3347

GIT_ORIGIN_REV_ID=0d6a0096b1ec98ba598a559369d7f17ad9d1723c
PiperOrigin-RevId: 524912877
2023-04-17 12:18:07 -07:00
dsn5ft
a93c91a2e2 [Predictive Back][Search] Only use device corner radius if SearchView reaches edge of screen
PiperOrigin-RevId: 524283122
2023-04-17 12:17:13 -07:00
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