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
Material Design Team
a81008f83e
[M3][ColorUtilities] Internal Color Utilities Library update
...
PiperOrigin-RevId: 540938594
2023-06-26 21:24:04 +00:00
Material Design Team
8e7ab4da91
[M3][ColorUtilities] Internal Color Utilities Library update
...
PiperOrigin-RevId: 540923527
2023-06-26 21:23:38 +00:00
rightnao
8b016a0e8b
[NavigationRail][Badge] Added bigger padding in between items on the navigation rail when font scale is large so there is more room for the badges when they are forced inside the view bounds
...
Also fixed bug with navigation rail items moving when there is a badge vs when there is no longer a badge, and adds 4dp padding between icon container/active indicator and label text as per specs https://m3.material.io/components/navigation-rail/overview
PiperOrigin-RevId: 540349399
2023-06-14 12:47:57 -07:00
afohrman
f2e70d2d66
[Android U] Replaced BuildCompat#isAtLeastU() method calls with explicit SDK checks for UPSIDE_DOWN_CAKE.
...
Before 1.12.0-alpha01 which was released on 6/7, BuildCompat#isAtLeastU() only returns true if API level is greater than 33 and the version running is a pre-release. Two things happened on 6/7 -- the version became a "platform stable" version, and core library version 1.12.0-alpha01 was released, which changes BuildCompat#isAtLeastU() to return true if the version is 34 and stable.
PiperOrigin-RevId: 540304068
2023-06-14 12:45:51 -07:00
hunterstich
a67a885668
[Predictive Back] Update components to use BackEventCompat
...
Clients should prefer listening to back events using androidx.activity.OnBackPressedCallback which has been updated to forward BackEventCompat objects in androidx.activity:activity:1.8.0-alpha05. This updates component predictive back APIs to take in BackEventCompat objects instead of android.window.BackEvent objects to simplify usage - getting rid of the need for version checks and object conversions.
PiperOrigin-RevId: 540290323
2023-06-14 12:44:53 -07:00
rightnao
9486de5f2f
[Carousel] Ensure that masks are pushed out beyond the parent bounds if they are _on_ the parent bounds
...
PiperOrigin-RevId: 540105089
2023-06-14 15:14:54 +00:00
pfthomas
022e217770
[Navigation] Add itemTextAppearanceActiveBoldEnabled attr
...
Resolves https://github.com/material-components/material-components-android/issues/3191
Resolves https://github.com/material-components/material-components-android/issues/3293
PiperOrigin-RevId: 539977391
2023-06-14 15:14:24 +00:00
pfthomas
4d8043453e
[MaterialDatePicker] Allow client app to access user selected inputMode
...
Resolves https://github.com/material-components/material-components-android/pull/3414
PiperOrigin-RevId: 539713099
2023-06-14 15:13:51 +00:00
pekingme
f18819949c
[Color] Internal cleanup.
...
PiperOrigin-RevId: 538268914
2023-06-09 07:59:24 -07:00