3396 Commits

Author SHA1 Message Date
pekingme
b9a2ce93c1 Automated g4 rollback of changelist 650718631
PiperOrigin-RevId: 651858394
2024-07-22 18:23:58 +00:00
pekingme
af95f452ed [ProgressIndicator] Added APIs to support different wavelength for determinate and indeterminate modes; and renamed confusing APIs.
PiperOrigin-RevId: 651565924
2024-07-22 18:23:15 +00:00
rightnao
6b263fa958 [Carousel] Fix carousel spamming view re-binding
PiperOrigin-RevId: 651470722
2024-07-22 18:22:04 +00:00
hunterstich
4abc9c60f1 [TextView] Fixed lint error when calling force refresh font variation settings
PiperOrigin-RevId: 651422787
2024-07-22 18:21:31 +00:00
pekingme
eb56238f46 [Shape] Moved unnecessary object from the drawable state.
PiperOrigin-RevId: 651118525
2024-07-22 18:20:56 +00:00
pfthomas
6617342f03 [DatePicker] Make picker not final and expose onPositiveButtonClick and onNegativeButtonClick
Resolves https://github.com/material-components/material-components-android/issues/1688

PiperOrigin-RevId: 651106986
2024-07-10 19:26:51 +00:00
hunterstich
fa5224ef05 [Typography] Added workaround for fontVariationSettings being set through a TextAppearance
A bug in AppCompatTextView causes fontVariationSettings set through a TextAppearance in xml to not take effect. This is a temporary woraround that cycles the settings to force them to be re-set until the fix is made in appcompat.

PiperOrigin-RevId: 651033811
2024-07-10 19:22:57 +00:00
pekingme
f641cd02a5 [ProgressIndicator] Updated the smoothness of the cubic bezier curve to make the wave more smooth.
PiperOrigin-RevId: 650879477
2024-07-10 19:21:49 +00:00
pekingme
2799892b5e [Shape] Added state list support to shape appearance and corner size.
PiperOrigin-RevId: 650718631
2024-07-10 19:21:00 +00:00
pfthomas
40cfb07e1f [TimePicker] Prevent setting wrong time while the clock is animating
PiperOrigin-RevId: 650636506
2024-07-09 15:43:36 +00:00
rightnao
c7143282a7 [Carousel] Remove library group restriction on Uncontained strategy
Resolves https://github.com/material-components/material-components-android/issues/4218

PiperOrigin-RevId: 650441233
2024-07-09 15:42:52 +00:00
rightnao
3fbb198a1c [BottomNavigationView] Update max item count to 6
PiperOrigin-RevId: 650353790
2024-07-08 20:34:03 +00:00
hunterstich
a9debc7a26 [Typography] Add variable font support to TextAppearance
PiperOrigin-RevId: 650200668
2024-07-08 20:33:22 +00:00
pekingme
0f3975d4f5 [ProgressIndicator] Fixed that the wavy path isn't cached correctly when initializing with 0 progress.
PiperOrigin-RevId: 648845270
2024-07-03 15:39:37 +00:00
kendricku
cd0a0f0235 [i18n] Update string translations.
Resolves https://github.com/material-components/material-components-android/issues/4177

PiperOrigin-RevId: 647723414
2024-07-01 18:59:32 +00:00
rightnao
20f92dfb51 [NavigationDrawer] Notify each adapter item of a potential change in case there are any item changes
Resolves https://github.com/material-components/material-components-android/issues/4168

PiperOrigin-RevId: 646154192
2024-06-25 14:53:10 +00:00
dsn5ft
5371290913 [CollapsingToolbarLayout] Refactor multiline rotation fix to address related issue caused by keyboard
PiperOrigin-RevId: 645057096
2024-06-20 18:19:59 +00:00
pekingme
a2b9322d88 [Color] Overloaded on-container colors in light theme for V+ to match the tone with system dynamic colors.
PiperOrigin-RevId: 644428365
2024-06-20 18:17:47 +00:00
dsn5ft
34adcb0fa1 [SearchView] Restore modal for accessibility and back handling state in onAttachedToWindow() and remove modal for accessibility state in onDetachedFromWindow()
Fixes an issue where nothing is focusable in TalkBack after removing SearchView, due to the modal for accessibility behavior

Resolves https://github.com/material-components/material-components-android/issues/4176

PiperOrigin-RevId: 644038017
2024-06-20 18:02:41 +00:00
pfthomas
6862b6f248 [DatePicker] Make header not focusable
PiperOrigin-RevId: 642318050
2024-06-11 19:01:27 +00:00
shawn hwang
3a31eef6f4 [NavigationView] Fixed item being checked instead of submenu item
Resolves https://github.com/material-components/material-components-android/pull/4155

Resolves https://github.com/material-components/material-components-android/issues/4187

GIT_ORIGIN_REV_ID=0f539d1e079f4bfcb044db26a4a0064538d29f05
PiperOrigin-RevId: 642317463
2024-06-11 19:00:12 +00:00
pekingme
61597e1aed [Tokens] Refreshed tokens in version "4.0.0"
PiperOrigin-RevId: 641994522
2024-06-11 18:58:26 +00:00
rightnao
87ab6606fd [NavigationRail] Add an attribute to control how we measure the bottom padding of the navigation item
PiperOrigin-RevId: 640992331
2024-06-11 18:57:33 +00:00
pfthomas
86a3b35aa2 [DatePicker] Prevent empty views at the end of a month to receive key events
PiperOrigin-RevId: 640991014
2024-06-11 18:55:24 +00:00
pekingme
63bb499f98 [ButtonToggleGroup] Renamed insideCorner to innerCorner.
PiperOrigin-RevId: 639864920
2024-06-05 18:30:46 +00:00
rightnao
99e8044f85 [NavigationRail] Add item spacing attribute
PiperOrigin-RevId: 639835301
2024-06-05 18:29:56 +00:00
rightnao
abb6e91a0a [NavigationBar] Add new itemIconGravity attribute
PiperOrigin-RevId: 638866190
2024-06-05 18:24:24 +00:00
rightnao
801ccab0c0 [NavigationRail] Add new attributes for NavigationRail to control the top margin of the nav rail content, and the margin in between the optional header and the menu items
PiperOrigin-RevId: 637957360
2024-06-05 18:22:06 +00:00
Material Design Team
e4f00fda11 Automated g4 rollback of changelist 637051547
PiperOrigin-RevId: 637099379
2024-05-28 16:59:17 +00:00
pekingme
384d58fb98 [Button] Added responsive touch (corner morph).
PiperOrigin-RevId: 637051547
2024-05-25 02:19:11 +00:00
dsn5ft
2bc1a2f344 [CollapsingToolbarLayout] Fix issues related to rotating multiline collapsing toolbars
PiperOrigin-RevId: 636597914
2024-05-24 15:33:53 +00:00
rightnao
60a525a167 [BottomNavigationView][NavigationRailView] Modifying NavigationBarView to match more to specs and restructuring layout to prepare for expressive changes
Changes:
- minHeight for BottomNavigationView is actually a minimum height, not an exact height; the bar height now wraps content properly
- For BottomNavigationView, bottom item padding now counts from the bottom of the label group instead of from the lowest label baseline. The label TextViews also have a min height of the line height supplied by the provided TextAppearance. This aligns with our m3 specs
- Structural changes in navigation item layouts. Previously the label and the icon were not aware of each other in a FrameLayout and could potentially overlap; this is no longer the case as they are in a LinearLayout
- padding between icon and label is 4dp as per specs
- Centering logic changed to center the icon and label as a group, not separately
PiperOrigin-RevId: 635922505
2024-05-23 14:54:36 +00:00
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