3033 Commits

Author SHA1 Message Date
Material Design Team
a782e7a1d8 [MaterialDatePicker][a11y] Fixing the "Column of Days:" announcement causing Talkback verbosity
PiperOrigin-RevId: 559224257
2023-08-23 22:21:37 +00:00
rightnao
b6f6eb555a [Carousel] Center aligned uncontained carousel
PiperOrigin-RevId: 559215330
2023-08-23 19:31:24 +00:00
pfthomas
faf9a32770 [M3][Color] Add Meizu to dynamic colors allowlist
PiperOrigin-RevId: 559204940
2023-08-23 19:30:19 +00:00
rightnao
9d81cac125 [Carousel] Add left-aligned uncontained strategy
PiperOrigin-RevId: 559197283
2023-08-23 19:28:53 +00:00
pekingme
7d8681f71d [Token] Added a comment before overridden resources.
PiperOrigin-RevId: 559136855
2023-08-23 19:28:08 +00:00
rightnao
eba40e9345 [NavigationView] Set material drawable background if the background has been set as a ColorStateList
resolves https://github.com/material-components/material-components-android/issues/3529

PiperOrigin-RevId: 558861471
2023-08-21 19:12:27 +00:00
rightnao
966f7daec9 [Carousel] Fix orientation not correct in item decoration calculations
Resolves https://github.com/material-components/material-components-android/issues/3500

PiperOrigin-RevId: 558825973
2023-08-21 19:11:40 +00:00
pubiqq
dc91b39d7c [Carousel] Update mask size on size change if mask x percentage has been set
Resolves https://github.com/material-components/material-components-android/pull/3450

GIT_ORIGIN_REV_ID=df8a325da6e4a796ab33d93e2ba165e40da8733e
Co-authored-by: imhappi
PiperOrigin-RevId: 558207460
2023-08-18 22:40:13 +00:00
Material Design Team
1a9d54fa41 [M3][Color] Remove resources loader support for tonal surface update
PiperOrigin-RevId: 557500242
2023-08-16 20:45:38 +00:00
Patrick Zedler
f2ccc116ea [Theme] Fix swapped error colors for dynamic contrast theme in light mode
Resolves https://github.com/material-components/material-components-android/pull/3516

GIT_ORIGIN_REV_ID=36239feca8a1a061279087b46403d2d8dac69ae1
PiperOrigin-RevId: 556179631
2023-08-12 02:39:17 +00:00
pekingme
8204856dd4 [Token][Color] Upgraded to v0.170 for tonal surface colors.
PiperOrigin-RevId: 555230534
2023-08-09 19:03:25 +00:00
afohrman
02dc77923b [Predictive Back] Fixed IllegalStateException crashes caused by MaterialBackAnimationHelper.
PiperOrigin-RevId: 555180647
2023-08-09 16:09:42 +00:00
pubiqq
6b897c6121 [MaterialDividerItemDecoration] Add RTL support
Resolves https://github.com/material-components/material-components-android/pull/3494

GIT_ORIGIN_REV_ID=774ebec04ab0105c0e2a55890863405f0edfd768
PiperOrigin-RevId: 553822845
2023-08-07 15:21:30 +00:00
Material Design Team
5617e7b084 [M3][Color] Internal color library update
PiperOrigin-RevId: 553658716
2023-08-07 15:20:23 +00:00
pekingme
c7a0adf8dd [AppBarLayout] Added getMaterialShapeBackground() to return a MaterialShapeDrawable object of the background (non-lifted layer).
PiperOrigin-RevId: 553531357
2023-08-04 01:04:40 +00:00
pekingme
720998dcbd [SearchBar] Enforced outline variant to use colorSurface as container color.
PiperOrigin-RevId: 553337995
2023-08-04 01:03:50 +00:00
rightnao
a16f180ce7 [Carousel] Fix issue with next carousel item not being masked properly
PiperOrigin-RevId: 551644125
2023-07-28 17:04:35 +00:00
raajkumars
4e5166f2b7 Automated g4 rollback of changelist 546349642
PiperOrigin-RevId: 551552652
2023-07-27 22:51:06 +00:00
rightnao
ff528621b3 [Carousel] Add a layout listener to recyclerview to refresh keyline state upon size change
PiperOrigin-RevId: 551280769
2023-07-27 22:50:16 +00:00
afohrman
f10153257f [Predictive Back][Search] Fixed UnsupportedOperationException AnimatorSet crash in SearchView.
When navigation icon animation is disabled after the predictive back navigation icon animators are initialized, a strange crash happens in `SearchViewAnimatorSet#updateBackProgress` from the call to `AnimatorSet#setCurrentPlayTime()`, in which the button progress `AnimatorSet` duration is 250 but the total duration is 0. This triggers an [`UnsupportedOperationException`](https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/animation/AnimatorSet.java#928) with the message: `"Error: Play time should always be in between 0 and duration."`.

Adding an early return from `SearchViewAnimatorSet#updateBackProgress` when navigation animation is disabled appears to fix the crash.

PiperOrigin-RevId: 550885523
2023-07-26 17:13:18 +00:00
pfthomas
db9a6412ec [MaterialSwitch] Amendments to thumb icon size support
Resolves https://github.com/material-components/material-components-android/pull/3364

PiperOrigin-RevId: 549627031
2023-07-20 22:17:48 +00:00
rightnao
547156e497 [Carousel] Add carousel alignment attribute
PiperOrigin-RevId: 548719675
2023-07-18 16:50:16 +00:00
Material Design Team
d3dda60296 [M3][Color] Added default framework text colors
PiperOrigin-RevId: 548148997
2023-07-17 15:59:15 +00:00
hunterstich
ba465a2b17 [Color] Update constructor comments
PiperOrigin-RevId: 548145472
2023-07-17 15:58:39 +00:00
rightnao
674ec44429 [Carousel] Fix issue with not refreshing keylines
PiperOrigin-RevId: 547956870
2023-07-17 15:58:09 +00:00
ekager
3b0fd5868e [ProgressIndicator] Closes #2361 - Allows extending LinearProgressIndicator and CircularProgressIndicator
Resolves https://github.com/material-components/material-components-android/pull/3416

GIT_ORIGIN_REV_ID=7e3b997ae796d047c7c0f381af51397f5c29a1f8
PiperOrigin-RevId: 547902662
2023-07-17 15:57:39 +00:00
pekingme
2b476b3a96 [TopAppBar] Updated the handling of liftOnScrollColor not override android:background.
PiperOrigin-RevId: 547883467
2023-07-17 15:56:54 +00:00
Material Design Team
0d80c04bff [M3][Color] Internal color library update
PiperOrigin-RevId: 547561948
2023-07-17 15:55:39 +00:00
Alexander Martinz
fde37cfba5 [M3][Color] Add shift to dynamic colors allowlist
Resolves https://github.com/material-components/material-components-android/pull/3376

GIT_ORIGIN_REV_ID=80ef9b25f8fa3d2a3c62ff85d4a5d4ee063f3d13
PiperOrigin-RevId: 547287777
2023-07-17 15:55:00 +00:00
hunterstich
64b066a0c4 Automated g4 rollback of changelist 546859519
PiperOrigin-RevId: 547258405
2023-07-11 19:39:14 +00:00
hunterstich
14023d2c85 [Carousel] Fixed MaskableFrameLayout not updating mask after size change when setting the mask using setMaskXPercentage.
This also fixes the default list catalog demo not displaying any items due to every item's mask having an empty maskRect.

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

PiperOrigin-RevId: 546859519
2023-07-11 19:38:42 +00:00
Material Design Team
839b14cf0f [M3][Color] Expose attr contrastColorThemeOverlay
PiperOrigin-RevId: 546792664
2023-07-11 19:38:11 +00:00
rightnao
e3b255b3a0 [Docs] Crosslink github docs in javadocs
PiperOrigin-RevId: 546393704
2023-07-11 19:37:37 +00:00
raajkumars
c15a323140 [SearchBar] Added support to set a default content description if a content description is not set explicitly.
PiperOrigin-RevId: 546349642
2023-07-11 19:35:33 +00:00
Material Design Team
57b26639d8 [Bugfix] Consistently use window coordinates to calculate Snackbar offsets. In one place screen and window coordinates are mixed, which leads to bad behavior in split screen apps.
PiperOrigin-RevId: 546057340
2023-07-07 17:55:24 +00:00
rightnao
9f2e6864d2 [NavigationBar] Set badges to be null instead of removing them from the sparse array so that removing badges before restoring badge states will not override the current state
PiperOrigin-RevId: 546027617
2023-07-07 17:49:34 +00:00
Material Design Team
862a7e10c9 [M3][Color] Add dynamic contrast support
PiperOrigin-RevId: 544727089
2023-07-05 13:40:51 +00:00
rightnao
bc54f2e4b3 [Carousel] Add full screen strategy
PiperOrigin-RevId: 544471620
2023-07-05 13:39:56 +00:00
pfthomas
d10201dc88 [MaterialTimePicker] Fix layout getting cut on narrow screens
PiperOrigin-RevId: 544436341
2023-07-05 13:39:33 +00:00
rightnao
7822ef827b [Carousel] Add orientation helper to clean up CarouselLayoutManager orientation differences
PiperOrigin-RevId: 543813088
2023-06-27 19:17:07 +00:00
Material Design Team
d287c805c4 [M3][ColorUtilities] Internal Color Utilities Library update
PiperOrigin-RevId: 543777709
2023-06-27 19:14:49 +00:00
hunterstich
ad60bbf5d9 [Predictive Back] Fixed MaterialBackAnimationHelper.onCancelBackProgress being called twice.
PiperOrigin-RevId: 543622236
2023-06-27 19:05:56 +00:00
rightnao
27abfdba4f [Badge] Deprecate bottom badge gravities and update docs and usages in catalog
PiperOrigin-RevId: 543527285
2023-06-27 18:55:22 +00:00
rightnao
6b48d3bb80 [Carousel] Add vertical scrolling capability
PiperOrigin-RevId: 542943240
2023-06-27 13:37:53 +00:00
rightnao
2362f4b64b [Badge][NavigationRail] Add new attribute for vertical offset when font is large
PiperOrigin-RevId: 542366571
2023-06-26 23:37:57 +00:00
rightnao
29d8742917 [Carousel] Deprecate set/get mask x percentages in Maskable as they are no longer used anywhere, and is a misleading method due to these methods not actually having any effect on the Carousel as CarouselLayoutManager overrides the values.
PiperOrigin-RevId: 542347361
2023-06-26 21:40:18 +00:00
Material Design Team
bdef355289 [TextInputEditText]Fix: TextInputEditText misses some visible lines in CursorAnchorInfo#getVisibleLineBounds after scrolled
TextInputEditText#getGlobalVisibleRect is overridden to call getGlobalVisibleRect on parent TextLayoutInput view directly. It doesn't match with the View#getGlobalVisibleRect implementation where the return globalOffset contains negative amount of the scroll in the view. As a result, calling getLocalVisibleRect will return a wrong rectangle when TextInputEiditText is scrolled.

PiperOrigin-RevId: 542341678
2023-06-26 21:26:12 +00:00
afohrman
122c2966fd [Predictive Back] Fixed possible NaN crashes in MaterialBottomContainerBackHelper, MaterialMainContainerBackHelper and MaterialSideContainerBackHelper.
There were some cases where we were dividing by the view's width and height in the  updateBackProgress methods, and this would cause a division by 0 exception and crash in cases where either the width or height are 0. Added a bunch of safeguards for division cases where the denominator could be 0.

PiperOrigin-RevId: 541929872
2023-06-26 21:25:39 +00:00
pfthomas
917da52393 [NavigationDrawer] Do not count headers for accessibility
PiperOrigin-RevId: 540975970
2023-06-26 21:25:15 +00:00
Material Design Team
52b7ff21ec [M3][ColorUtilities] Internal Color Utilities Library update
PiperOrigin-RevId: 540948389
2023-06-26 21:24:34 +00:00