3207 Commits

Author SHA1 Message Date
pubiqq
d85b73f952 [Slider] Fix the handle width when touched in a scrolling container and when more than one handle is in the touch position.
Resolves https://github.com/material-components/material-components-android/pull/4151
Resolves https://github.com/material-components/material-components-android/issues/4149
Resolves https://github.com/material-components/material-components-android/issues/4150

GIT_ORIGIN_REV_ID=d78e6e24416135fa1a21dc6e298902ab6b893490
PiperOrigin-RevId: 635894036
2024-05-23 14:51:32 +00:00
pubiqq
8edae9b8cc [NavigationView] Fix section label alignment in RTL.
Resolves https://github.com/material-components/material-components-android/pull/4119
Resolves https://github.com/material-components/material-components-android/issues/4178

GIT_ORIGIN_REV_ID=8bb965ac42ed085a6a3d5541ca846ee263d7d5be
PiperOrigin-RevId: 635461461
2024-05-20 21:18:18 +00:00
Ga\u00ebtan Muller
28dc750cf7 [Badge] Remove BadgeUtils.USE_COMPAT_PARENT
Resolves https://github.com/material-components/material-components-android/pull/4170

GIT_ORIGIN_REV_ID=35f11c97b64f22b9c3994b41b35c955f7a4261ed
PiperOrigin-RevId: 634877849
2024-05-17 21:08:54 +00:00
pubiqq
182a50714c [TimePicker] Prevent the accumulation of listeners in rotationAnimator
Resolves https://github.com/material-components/material-components-android/pull/3973

GIT_ORIGIN_REV_ID=1b09e58865abfdf91610da16919e7f4f28739c09
PiperOrigin-RevId: 634850525
2024-05-17 21:08:13 +00:00
pubiqq
26bfdd2257 [NavigationView] Fix subheader and divider insets and use relative listPreferredItemPaddings.
Resolves https://github.com/material-components/material-components-android/pull/4122
Resolves https://github.com/material-components/material-components-android/pull/4123

GIT_ORIGIN_REV_ID=911d1af88c0d10c6894bf38546b870430e86b6f9
PiperOrigin-RevId: 634517597
2024-05-16 21:30:24 +00:00
pubiqq
ce00ba3778 [ProgressIndicator] Fix ArithmeticException when calculating the phase
Resolves https://github.com/material-components/material-components-android/pull/4154

GIT_ORIGIN_REV_ID=d5aedbbd23f1b6d126263cba8960df0bc36386c4
PiperOrigin-RevId: 634014470
2024-05-15 19:06:04 +00:00
dsn5ft
d13bfdf3cd [Predictive Back] Update SearchView and NavigationView to unregister back callbacks when detached from window
Resolves https://github.com/material-components/material-components-android/issues/4176

PiperOrigin-RevId: 633969673
2024-05-15 16:58:34 +00:00
pubiqq
a89e38c0cf [BottomSheet] Recycle the TypedArray after usage
Resolves https://github.com/material-components/material-components-android/pull/4032

GIT_ORIGIN_REV_ID=f9ac4cf68c6ef7cd41d0bbdca2c7d09b0f99f5d9
PiperOrigin-RevId: 633632973
2024-05-15 16:57:50 +00:00
dsn5ft
9b6ceac72a [i18n] Update string translations
PiperOrigin-RevId: 633623911
2024-05-14 17:16:18 +00:00
pubiqq
510881a469 [Internal] Stop using deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4117

GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
pfthomas
501ae367a1 [DatePicker] Fix arrangement of range text fields
- gives enough space for the text to not wrap when width too narrow

PiperOrigin-RevId: 632262914
2024-05-13 17:36:19 +00:00
rightnao
9451acdb05 [Badge] Add badgeFixedEdge attribute to BadgeDrawable.
By default, badges are fixed at their start edge (meaning they grow towards the end). If using a badgeGravity corresponding to the start, you will need to update to badgeFixedEdge=end to maintain the same grow towards the start behavior as before

PiperOrigin-RevId: 632236586
2024-05-13 15:48:21 +00:00
Ga\u00ebtan Muller
b3fe6a7f61 [Cleanup] Remove redundant version checks for api <= 19.
Resolves https://github.com/material-components/material-components-android/pull/3849

GIT_ORIGIN_REV_ID=47bb2fcc8031740e5a7d4f741f1ada2af025e126
PiperOrigin-RevId: 632154861
2024-05-09 18:46:02 +00:00
kendricku
d04da7d51b [TimePicker] Fix color of unselected state in AM/PM picker.
Specs:  https://m3.material.io/components/time-pickers/specs
PiperOrigin-RevId: 631920571
2024-05-09 14:12:57 +00:00
leticiars
500dae836c [Tabs] Fix selected text appearance not being applied correctly.
Fixes https://github.com/material-components/material-components-android/issues/4161

PiperOrigin-RevId: 631847488
2024-05-09 14:11:40 +00:00
pekingme
7c9f372119 [ButtonToggleGroup] Fixed a bug of setting inner buttons in vertical layout.
PiperOrigin-RevId: 631588360
2024-05-09 14:11:01 +00:00
pubiqq
9da999342d [Drawable][Internal] Add constant state support to ScaledDrawableWrapper which fixes NPE crash in APIs <= 23
Resolves https://github.com/material-components/material-components-android/pull/3572
Resolves https://github.com/material-components/material-components-android/issues/4129

GIT_ORIGIN_REV_ID=9e4b5c3ba4f715afc5f198d0b6afb163480d0138
PiperOrigin-RevId: 631436018
2024-05-07 18:48:10 +00:00
dsn5ft
0429d448a0 [Transition] Update MaterialContainerTransform to use getLocationInWindow() instead of getLocationOnScreen() when calculating bounds
Fixes issue where start / end view jump during transition in landscape mode when there is an artificial inset due to the camera hole / other display cutouts

PiperOrigin-RevId: 631421213
2024-05-07 18:47:15 +00:00
kendricku
41eb087003 [Chip] Update Chip javadoc to reference CompoundButton.OnCheckedChangeListener instead of AppCompatCheckBox.OnCheckedChangeListener.
PiperOrigin-RevId: 631036631
2024-05-07 18:46:28 +00:00
rightnao
0d265b7ca5 [Badge] Deprecate autoAdjustToGrandparentBounds attribute since now badges automatically move within first ancestor view that does not clip children
PiperOrigin-RevId: 630215388
2024-05-03 19:29:13 +00:00
pekingme
e4fbb84f47 [Shape] Fixed stroke path calculation for custom interpolation start shape.
PiperOrigin-RevId: 629942322
2024-05-02 15:45:01 +00:00
pekingme
cb5afbc1d6 [ProgressIndicator] Updated to draw the track in Circular indeterminate mode with an option to opt out this behavior.
PiperOrigin-RevId: 629828525
2024-05-02 15:43:35 +00:00
rightnao
3880efefef [Badge] Adjust badges to fit within the bounds of the first ancestor view that clips its children to avoid getting cut off
PiperOrigin-RevId: 629810011
2024-05-02 15:42:17 +00:00
dsn5ft
cadbd6af83 [Dialog] Temporarily suppress RtlCompat lint for res/layout/mtrl_alert_select_dialog_singlechoice.xml
PiperOrigin-RevId: 629180270
2024-04-30 20:01:48 +00:00
dsn5ft
890053a734 [Dialog] Temporarily suppress RtlCompat lint for res/layout/mtrl_alert_select_dialog_multichoice.xml
PiperOrigin-RevId: 629168705
2024-04-30 20:00:13 +00:00
pekingme
fb4761cc20 [ButtonToggleGroup] Added APIs to customize inside spacing and corner size between buttons.
PiperOrigin-RevId: 628469557
2024-04-29 19:03:54 +00:00
Material Design Team
a7a234bf07 [Bottom Sheet] Prevents nested scroll from occurring in a scroll session when the bottom sheet is already being resized.
Previously, the bottom sheet could be fixed at any height while resizing it by triggering a fling in the opposite direction.

PiperOrigin-RevId: 628170687
2024-04-26 17:52:32 +00:00
pekingme
373008ad17 [ProgressIndicator] Added circular indeterminate animation options - advance (M3) and retreat (new).
PiperOrigin-RevId: 627941610
2024-04-26 17:51:26 +00:00
rightnao
cf143d0760 [NavigationBar] Modify test usage to use icon container so we don't have to special case the existence of the icon container
PiperOrigin-RevId: 627837170
2024-04-26 17:49:54 +00:00
kendricku
cc125d9b47 [Shape] Add interpolation between default and an arbitrary corner radius for Android Material Views.
PiperOrigin-RevId: 626446451
2024-04-23 20:20:48 +00:00
pfthomas
9b09b693d9 [Tokens] Update tokens to v4.0.0
PiperOrigin-RevId: 626141198
2024-04-19 21:18:49 +00:00
dsn5ft
25d189bb8d [TextAppearance] Update font loading to load synchronously for system font families
Also avoids creating the Typeface twice because previously shouldLoadFontSynchronously() and getFont() would both create a Typeface in some cases

PiperOrigin-RevId: 625813788
2024-04-18 18:48:09 +00:00
dsn5ft
136a685119 [Predictive Back] Update predictive back animations to use interpolation curve of (0.1, 0.1, 0, 1)
PiperOrigin-RevId: 625671874
2024-04-17 18:06:46 +00:00
rightnao
8c541e6b25 [Carousel] Prevent scrolling if there's less items than focal keylines
PiperOrigin-RevId: 625466841
2024-04-17 18:04:41 +00:00
rightnao
9393b9779e [Carousel] Support unclipped padding for uncontained variant of carousel
PiperOrigin-RevId: 625101250
2024-04-16 17:52:05 +00:00
dsn5ft
d056cc352f [Bottom Sheet] Allow dragging the sheet on overscroll when draggableOnNestedScroll=false
PiperOrigin-RevId: 624269903
2024-04-15 17:59:25 +00:00
dsn5ft
a35b6b835c [Bottom Sheet] Add ability to disable dragging/expanding/collapsing the sheet when touching/scrolling the nested scrolling child view
PiperOrigin-RevId: 624204480
2024-04-12 20:03:30 +00:00
Material Design Team
3e866b8715 [AppBarLayout] Allow scrolling up when the app bar is lifted.
1. Suppose the view is large enough to scroll down
2. After scrolling down, you hide a child view, which reduces the height to a value which means it would have been unscrollable in step 1
3. Now you can’t scroll back up

PiperOrigin-RevId: 623883120
2024-04-11 20:08:04 +00:00
dsn5ft
b77b1412a3 [Search] Add start delay to scrim animation during SearchBar to SearchView expand to reduce visual noise
PiperOrigin-RevId: 623875803
2024-04-11 20:07:18 +00:00
pekingme
c1531396de [ProgressIndicator] Improved cold start performance.
PiperOrigin-RevId: 623243122
2024-04-10 18:47:15 +00:00
dsn5ft
b56afa75a9 [SearchView] Update back arrow to be auto mirrored for RTL
PiperOrigin-RevId: 622863529
2024-04-09 18:46:12 +00:00
pekingme
7c77d5a8eb Automated g4 rollback of changelist 620909554
PiperOrigin-RevId: 621977121
2024-04-09 17:24:47 +00:00
pekingme
23bcd50682 [ProgressIndicator] Added ramping animation to wave amplitude for both Linear and Circular types. (roll forward)
PiperOrigin-RevId: 621631230
2024-04-03 21:15:30 +00:00
pekingme
2a80e162ce [ProgressIndicator] Improved the smoothness of the animation when inactive track's ends are close.
Resolves https://github.com/material-components/material-components-android/issues/4124

PiperOrigin-RevId: 621620538
2024-04-03 21:13:50 +00:00
pekingme
e8452fb389 [ProgressIndicator] Applied a workaround in Circular counter-clockwise.
Resolves https://github.com/material-components/material-components-android/issues/4125

PiperOrigin-RevId: 621606567
2024-04-03 21:13:16 +00:00
pekingme
b50cb1e9a0 [ProgressIndicator] Added waggle animation (wave speed) to active indicator in both Linear and Circular types. (roll forward)
PiperOrigin-RevId: 621299301
2024-04-03 21:11:57 +00:00
pfthomas
d2831cbfe1 [TimePicker] Make ClockFaceView not focusable
Prevent keyboard navigation from unnecessarily focusing the clock face.

PiperOrigin-RevId: 620981338
2024-04-02 15:02:20 +00:00
pekingme
89d94852d5 Internal change
PiperOrigin-RevId: 620909554
2024-04-02 15:01:48 +00:00
pekingme
c1b1d472d8 [ProgressIndicator] Internal revert.
PiperOrigin-RevId: 620344595
2024-04-02 14:59:54 +00:00
pekingme
267cb184a8 [ProgressIndicator] Internal revert.
PiperOrigin-RevId: 620339133
2024-04-02 14:59:14 +00:00