3254 Commits

Author SHA1 Message Date
manabu-nakamura
144b5159ce [Slider] Fix slider label not moving while scrolling
Resolves https://github.com/material-components/material-components-android/pull/3848
Resolves https://github.com/material-components/material-components-android/issues/3847

GIT_ORIGIN_REV_ID=630698384082464cfb40d75156ec09abfc829bed
PiperOrigin-RevId: 584067588
2023-11-20 15:13:26 -05:00
dsn5ft
198e08cf5e [i18n] Update string translations for checkbox, search, and sidesheet
PiperOrigin-RevId: 582397137
2023-11-14 20:04:14 +00:00
rightnao
83a7ed8dd5 Automated g4 rollback of changelist 581318308
PiperOrigin-RevId: 582358366
2023-11-14 19:57:17 +00:00
pekingme
22e054ba68 [ProgressIndicator] Added static drawable for Circular type when system animator is disabled.
PiperOrigin-RevId: 582068647
2023-11-14 19:49:43 +00:00
pekingme
9b9449cde1 [TextInputLayout] Limited the min height reset in text change listener only when line count changes.
PiperOrigin-RevId: 582049113
2023-11-13 20:58:05 +00:00
pfthomas
bc5987379e [NTC][ProgressIndicator] Internal changes
PiperOrigin-RevId: 581401427
2023-11-13 15:12:51 +00:00
pfthomas
5e5eee01bd [Slider] Fix slider label not moving while scrolling
Resolves https://github.com/material-components/material-components-android/issues/3660
Resolves https://github.com/material-components/material-components-android/issues/2869
Resolves https://github.com/material-components/material-components-android/pull/3665

PiperOrigin-RevId: 581318308
2023-11-13 15:09:45 +00:00
pfthomas
42466721ca [NTC][Slider] Internal changes
PiperOrigin-RevId: 581303119
2023-11-13 14:56:39 +00:00
rightnao
92a5444de9 [Carousel] Add attributes to change small item size
PiperOrigin-RevId: 580249803
2023-11-08 15:13:51 +00:00
pekingme
4ccaaaa31d [Tokens] Upgraded to v0.203
PiperOrigin-RevId: 579928128
2023-11-08 15:12:21 +00:00
pekingme
637362d597 [Tokens] Upgraded to v0.195
PiperOrigin-RevId: 579905417
2023-11-06 20:27:15 +00:00
pekingme
0463c507d7 [Tokens] Upgraded to v0.185
PiperOrigin-RevId: 579904837
2023-11-06 20:26:18 +00:00
pekingme
4a2654a3f3 [TextInputLayout] Fixed unnecessary min height when losing focus with multiple lines.
Resolves https://github.com/material-components/material-components-android/issues/3451

PiperOrigin-RevId: 579017528
2023-11-06 14:00:10 +00:00
manabu-nakamura
f3e4439ca6 [Dialog] Unified scrim opacity in Material themes/theme overlays.
Resolves https://github.com/material-components/material-components-android/pull/3643

PiperOrigin-RevId: 579005745
2023-11-06 13:59:35 +00:00
pubiqq
81d1b772b9 [Theme] Add NoActionBar dynamic color themes
Resolves https://github.com/material-components/material-components-android/pull/3636

GIT_ORIGIN_REV_ID=ab4463028a14e4d4fbd3a613c4c402b8de39f552
PiperOrigin-RevId: 578900644
2023-11-06 13:58:24 +00:00
pubiqq
7674e12ea8 [CollapsingToolbarLayout] Fix text shadow fading when transitioning between expanded and collapsed states
Resolves https://github.com/material-components/material-components-android/pull/3641

GIT_ORIGIN_REV_ID=7243f7a2f09b04caceec488443b1652a8ffef961
PiperOrigin-RevId: 578838845
2023-11-06 13:57:49 +00:00
pfthomas
5aa6edfaed [DatePicker] Fix date validation on Samsung devices
Resolves https://github.com/material-components/material-components-android/pull/3628
Resolves https://github.com/material-components/material-components-android/issues/3625

PiperOrigin-RevId: 576953414
2023-10-26 20:39:41 +00:00
conradchen
a8307ef792 [Process] Update translated strings
PiperOrigin-RevId: 576679982
2023-10-26 20:38:39 +00:00
hunterstich
2ac8c1cbf6 [TopAppBar] Fixed compress effect clipping on API 21-24
Partially resolves https://github.com/material-components/material-components-android/issues/3603

PiperOrigin-RevId: 576102714
2023-10-26 20:37:38 +00:00
dsn5ft
541df074a7 [Color] Delete unused contrast resources
PiperOrigin-RevId: 574960734
2023-10-19 12:13:49 -07:00
Material Design Team
ad63d3ff7e [M3][Color] Introduce U color tokens
PiperOrigin-RevId: 574897222
2023-10-19 11:35:44 -07:00
pubiqq
2590c42764 [TextInputLayout] Fix editText paddings on pre-Lollipop
Resolves https://github.com/material-components/material-components-android/pull/3583
Resolves https://github.com/material-components/material-components-android/issues/3582

GIT_ORIGIN_REV_ID=356f7488505470656d26b0452dae78ae01475022
PiperOrigin-RevId: 574833205
2023-10-19 11:34:21 -07:00
rightnao
17baf71972 [Carousel] Ensure that extra small size is not larger than the large size
resolves https://github.com/material-components/material-components-android/issues/3640

PiperOrigin-RevId: 574514980
2023-10-19 11:31:13 -07:00
hunterstich
26c3129201 [Carousel] Fixed crash when recyclerview has a size of zero.
Resolves https://github.com/material-components/material-components-android/issues/3634

PiperOrigin-RevId: 573843130
2023-10-17 10:55:34 -07:00
rightnao
fb9c1c6edf [Carousel] When navigating with keyboard, scroll focused item to nearest focal keyline, not the first focal keyline
PiperOrigin-RevId: 573024609
2023-10-13 12:37:16 -07:00
hunterstich
a00ee50907 [DatePicker] Added builder methods for customizing the positive and negative button content descriptions
Resolves https://github.com/material-components/material-components-android/issues/3595

PiperOrigin-RevId: 572929926
2023-10-12 11:05:22 -07:00
pekingme
bfee8a74d7 [Tokens] Upgraded to v0.175.
PiperOrigin-RevId: 572648883
2023-10-12 11:04:28 -07:00
rightnao
9a2347bda5 [Carousel] Force hero strategy to be start-aligned if there are not enough items to make it center-aligned
Resolves https://github.com/material-components/material-components-android/issues/3626

PiperOrigin-RevId: 572641635
2023-10-12 11:03:50 -07:00
Material Design Team
be1395bcef [SearchBar] Set the editable property within SearchBar's AccessibilityNodeInfo representation.
PiperOrigin-RevId: 572589922
2023-10-12 11:03:15 -07:00
rightnao
cbb380df61 [Carousel] Add logic for multibrowse strategy to change strategy when number of items is less than the number of keylines
Resolves https://github.com/material-components/material-components-android/issues/3598

PiperOrigin-RevId: 572078262
2023-10-10 10:46:28 -07:00
hunterstich
0356f24a63 [Carousel] Fixed focus order when using keyboard navigation for hero carousels.
When using the keybaord to move between items, FocusFinder would occasionally skip an item because it was using the unmasked bounds of each item to compare their distance.

PiperOrigin-RevId: 572025177
2023-10-10 10:44:21 -07:00
rightnao
ed4647d5df [Carousel] Cleaning up multi-browse strategy and removing compact arrangement
PiperOrigin-RevId: 572006115
2023-10-10 10:43:37 -07:00
Material Design Team
93360a5a5d [TextInputLayout] Fix onMeasure() infinite loop bug caused by posting requestLayout() before endLayout is fully rendered.
Brief explanation: in TextInputLayout#onMeasure, TextInputLayout will try to send a post to trigger requestLayout() method based on the boolean value returned from updateDummyDrawbles() method, but in shouldUpdateEndDummyDrawable(), we try to get the endLayout.getMeasureWidth() which is not reliable, if the endLayout hasn't rendered fully, the getMeasureWidth() will return 0 making the updateDummyDrawables() to return TRUE to trigger requestLayout() in an infinite loop.

To fix this issue, we need to introduce ViewTreeObserver to help us to run posing the requstLayout() after endLayout/startLayout is fully rendered.

PiperOrigin-RevId: 571765829
2023-10-10 10:21:12 -07:00
dsn5ft
5559cbc7c7 [Predictive Back][Search] Update to use decelerate interpolator
PiperOrigin-RevId: 571442671
2023-10-10 10:20:11 -07:00
rightnao
78cc54b8c3 [Badge][NavRail][BottomNavBar] Adjust badge vertical offset for certain components to fit design requirements
PiperOrigin-RevId: 569527192
2023-10-02 13:41:39 +00:00
dsn5ft
094e3e21ea [CollapsingToolbarLayout] Fix issue where expanded text gets ellipsized too aggressively when using title fade mode and the toolbar has menu items
PiperOrigin-RevId: 569287167
2023-10-02 13:39:52 +00:00
dsn5ft
bccbd4f778 [Predictive Back][NavigationView] Fix issue where predictive back is not enabled in NavigationView after rotating the screen or restarting the activity when the NavigationView is already opened as a drawer
Resolves https://github.com/material-components/material-components-android/issues/3593

PiperOrigin-RevId: 569181523
2023-10-02 13:38:12 +00:00
rightnao
d5d604d0cc [Carousel] Disallowing center aligned hero strategy with only 2 items since it does not make any sense. With only 2 items there can only be a start state and end state with the hero strategy.
Resolves https://github.com/material-components/material-components-android/issues/3589

PiperOrigin-RevId: 568965460
2023-10-02 13:36:53 +00:00
rightnao
8cb444b268 [Carousel] Fix issue with uncontained carousel not having a proper end scroll value due to assumption made in end scroll calculation
resolves https://github.com/material-components/material-components-android/issues/3599

PiperOrigin-RevId: 568948116
2023-10-02 13:36:19 +00:00
dsn5ft
a51561d8b8 [SearchView][Predictive Back] Fix issue where predictive back is not enabled in SearchView after rotating the screen or restarting the activity when the SearchView is already expanded
Resolves https://github.com/material-components/material-components-android/issues/3594
Resolves https://github.com/material-components/material-components-android/pull/3604

PiperOrigin-RevId: 568869369
2023-10-02 13:35:25 +00:00
rightnao
4a6ae4d0b6 [Carousel] Update scroll offset to scroll to the estimated position that it was at upon an initial load
Resolves https://github.com/material-components/material-components-android/issues/3590

PiperOrigin-RevId: 568642330
2023-09-26 20:55:25 -04:00
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