3213 Commits

Author SHA1 Message Date
hunterstich
c418063205 [Carousel] Fixed strategies crashing when there is not enough available space for a large and a small item
If the carousel container is not large enough to fit a small item and large item that is at least as large as the minimum small item size, mutli-browse and hero strategies will create an arrangment with a single, large item.

PiperOrigin-RevId: 568610428
2023-09-26 20:54:33 -04:00
Material Design Team
31af945caa [MaterialCardView] Support android:duplicateParentState.
MaterialCardView hasn't shown the pressed ripple effect if the parent view is
pressed and it has `android:duplicateParentState=true`, because its foreground
drawable is not a RippleDrawable. This CL fixes the issue.

PiperOrigin-RevId: 567117430
2023-09-21 14:46:51 +00:00
rightnao
5e6ea58280 [Badge] Add note in attachBadgeDrawable method docs about menu item views being re-used when there is a structural change in the menu. Since badges are attached to the views, this may change the menu item that the badge is intended for
PiperOrigin-RevId: 566995151
2023-09-21 14:45:39 +00:00
pekingme
bc824b4344 [Ripple] Updated focused and pressed state from 0.12 to 0.10 to increase the contrast ratio with tonal surface color.
PiperOrigin-RevId: 566768258
2023-09-20 12:30:59 +00:00
pekingme
1e9f5f0730 [AppBarLayout] Simplified logics to animate the container color between lifted state and the default state.
PiperOrigin-RevId: 566754407
2023-09-20 12:30:16 +00:00
dsn5ft
8d83a31b6b [Predictive Back][Search] Fix issue where modal accessibility is not reset after collapsing search view predictively, which caused the screen to appear frozen when using TalkBack
PiperOrigin-RevId: 566750080
2023-09-20 12:29:04 +00:00
rightnao
93660d4241 [Carousel] Tweak uncontained strategy logic to adjust medium size items to improve motion
PiperOrigin-RevId: 566720825
2023-09-19 20:29:10 +00:00
dsn5ft
c4ae01a5a5 [AppBarLayout] Fix dynamic status bar foreground lift on scroll color when using Tonal Surface Color on API Level 33
Resolves https://github.com/material-components/material-components-android/issues/3530
Resolves https://github.com/material-components/material-components-android/issues/3585

PiperOrigin-RevId: 566609767
2023-09-19 20:28:23 +00:00
hunterstich
b80d9a5ef4 [Carousel] Fixed formatted for KeylineState and KeylineStateList
PiperOrigin-RevId: 565711087
2023-09-15 17:26:58 -04:00
hunterstich
7151714711 [Carousel] Fixed keyline shifting in RTL for uncontained carousels
Resolves https://github.com/material-components/material-components-android/issues/3554
Resolves https://github.com/material-components/material-components-android/issues/3580

PiperOrigin-RevId: 565654556
2023-09-15 17:26:05 -04:00
pubiqq
4ce7e4c8fa [Carousel] Reduce the number of truncations in intermediate calculations
Resolves https://github.com/material-components/material-components-android/pull/3581
Resolves https://github.com/material-components/material-components-android/issues/3579

GIT_ORIGIN_REV_ID=1bcb42de0535edac134a6fc27dcb14b22f7dc1a5
PiperOrigin-RevId: 565653783
2023-09-15 17:25:17 -04:00
dsn5ft
5f2b4b2531 [CollapsingToolbarLayout] Fixed title collapse fade mode color to use a Tonal Surface role instead of elevation overlay
Resolves https://github.com/material-components/material-components-android/issues/3525

PiperOrigin-RevId: 564678269
2023-09-12 10:48:57 -04:00
dsn5ft
569ddac527 [AppBarLayout] Fix dynamic status bar foreground lift on scroll color when using Tonal Surface Color
Resolves https://github.com/material-components/material-components-android/issues/3530

PiperOrigin-RevId: 564364138
2023-09-12 10:47:09 -04:00
pekingme
43242f20de [TopAppBar] Fixed that liftOnScrollColor doesn't respect to setLifted when liftOnScroll is set to false.
Resolves https://github.com/material-components/material-components-android/issues/3523

PiperOrigin-RevId: 563829477
2023-09-08 16:10:50 -04:00
pubiqq
a10c5083a9 [MaterialSwitch] Fix drawable scaling for API < 23
Resolves https://github.com/material-components/material-components-android/pull/3513

GIT_ORIGIN_REV_ID=d6b880efdab77b6c1171b3f53ee8d3fcf568f838
PiperOrigin-RevId: 563748930
2023-09-08 13:08:54 -04:00
pubiqq
0663019f45 [Color] Add ColorStateListDrawable support
Resolves https://github.com/material-components/material-components-android/pull/3538

GIT_ORIGIN_REV_ID=1bf9e320dc148e1bc959e7577372d3a393f35574
PiperOrigin-RevId: 563258432
2023-09-07 12:37:54 +00:00
pekingme
b5d6f1ae45 [ActionBar] Removed layered drawable for the background after tonal surface color.
PiperOrigin-RevId: 563179427
2023-09-07 12:37:18 +00:00
leticiars
9a4888f958 [TextInputLayout] Mutate cursor drawable before tinting it.
Resolves https://github.com/material-components/material-components-android/issues/3491

PiperOrigin-RevId: 561722342
2023-08-31 15:11:02 -04:00
pubiqq
de271320e4 [BottomSheet] Fix sheet corners animation
Resolves https://github.com/material-components/material-components-android/pull/3541
Resolves https://github.com/material-components/material-components-android/issues/3540

GIT_ORIGIN_REV_ID=747db4e9eeed0b14ea1f949862176346afc4944a
PiperOrigin-RevId: 560143863
2023-08-25 19:25:16 +00:00
rightnao
c6ea2d4040 [Carousel] Update vertical scroll speed to be faster
PiperOrigin-RevId: 559888221
2023-08-25 19:21:59 +00:00
rightnao
3d84841cad [Carousel][A11y] Fix some a11y bugs in Carousel
PiperOrigin-RevId: 559881261
2023-08-25 17:51:59 +00:00
pfthomas
5f1cab65b1 [MaterialDatePicker] Fix header layout overlapping
PiperOrigin-RevId: 559538381
2023-08-24 20:50:49 +00:00
pekingme
6b627c20e2 [Tabs] Integrated divider token output into the background drawables.
PiperOrigin-RevId: 559477915
2023-08-23 22:22:19 +00:00
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