3709 Commits

Author SHA1 Message Date
rightnao
ac4f111b90 [Lists] Token integration
PiperOrigin-RevId: 864955412
2026-02-03 20:27:34 +00:00
Material Design Team
0046fdedb7 Automated g4 rollback of changelist 859551741
PiperOrigin-RevId: 862933180
2026-02-03 20:26:47 +00:00
rightnao
21060b260e [Lists] Add API to update list shape explicitly
Resolves  https://github.com/material-components/material-components-android/issues/5001

PiperOrigin-RevId: 862337925
2026-02-03 20:22:25 +00:00
Material Design Team
db3298e449 [Search] Implement M3E styles for SearchView
This change implements the Material 3 Expressive styles for SearchView, which includes updated toolbar shape, background color, and paddings.

PiperOrigin-RevId: 861835368
2026-02-03 20:21:29 +00:00
pekingme
40d1be5bba [I18n] Updated translation strings.
PiperOrigin-RevId: 861779608
2026-01-27 18:30:09 +00:00
Material Design Team
d227870dc2 [CollapsingToolbarLayout] Fix jumping when multiline title changes while collapsed
When a multiline title changes length (e.g. multi-line to single-line) while collapsed, the layout height decreases. If the previous scroll offset is deeper than the new valid range, the AppBarLayout can jump or get stuck in an invalid state.

This fix forces the AppBarLayout to `PENDING_ACTION_COLLAPSED` if the CollapsingToolbarLayout height changes while fully collapsed. This ensures it snaps correctly to the new collapsed offset.

PiperOrigin-RevId: 861133526
2026-01-27 17:49:54 +00:00
Material Design Team
85c910f0fc [TextInputLayout][A11y] Announce helper text on focus
Merge the helper text into the EditText's content description instead of treating it as a separate element

PiperOrigin-RevId: 860127150
2026-01-23 20:32:08 +00:00
pekingme
57f3cdbda3 [Tokens] Updated token version to 31.0.0
PiperOrigin-RevId: 859699661
2026-01-22 19:49:30 +00:00
Material Design Team
f1193e39c1 [FAB] Override setContentDescription to also set the tooltip text on API 26+
PiperOrigin-RevId: 859551741
2026-01-22 19:48:41 +00:00
leticiars
fa56dd64ce [Button] Add support for a secondary icon.
PiperOrigin-RevId: 859283876
2026-01-22 19:47:49 +00:00
Material Design Team
f49517f7d3 Automated g4 rollback of changelist 859123237
PiperOrigin-RevId: 859205893
2026-01-21 21:21:58 +00:00
Material Design Team
81373b774d [Search] Hide search view divider for M3E
This change hides the divider on search view between the toolbar and content. It prepares for the contained style in Material 3 Expressive.

PiperOrigin-RevId: 859185807
2026-01-21 21:20:15 +00:00
leticiars
4bb9acdaa3 [Button] Add support for a secondary icon.
PiperOrigin-RevId: 859123237
2026-01-21 21:13:00 +00:00
rightnao
845a0e385a [Lists] Update state colors for label styles and update demos so ListItemCardView children will duplicate and pass on its parent state
PiperOrigin-RevId: 856272316
2026-01-14 20:57:03 +00:00
pubiqq
58ad14ea94 [TopAppBar] Make letter spacing dependent on text size in CollapsingTextHelper
Resolves https://github.com/material-components/material-components-android/pull/4640

GIT_ORIGIN_REV_ID=587f81fd992281152fb9a0c83ae74d47cde4c3a0
PiperOrigin-RevId: 854203889
2026-01-12 16:16:57 +00:00
dsn5ft
00e5edac88 [i18n] Update string translations
(copyright year + snackbar close button content description)

PiperOrigin-RevId: 853819674
2026-01-12 16:16:19 +00:00
Material Design Team
1fd35bc7e8 [DatePicker] Add tooltips to icon buttons
Adds tooltips to the month navigation buttons in MaterialCalendar and the header toggle button in MaterialDatePicker

PiperOrigin-RevId: 853333712
2026-01-08 18:00:48 +00:00
rightnao
504300d37e [Lists] Support start/end reveal gravity in ListItemLayout
PiperOrigin-RevId: 846460595
2025-12-19 13:52:24 +00:00
pubiqq
499350d454 [Button] Fix click sound for checkable button
Resolves https://github.com/material-components/material-components-android/pull/4967
Resolves https://github.com/material-components/material-components-android/issues/4966

  - 30f9eff3320dcf06af85b738e9eb49eb43abc096 by pubiqq <serj.ese@gmail.com>

PiperOrigin-RevId: 846358306
2025-12-19 13:50:49 +00:00
Eugene Golushkov
88717fc8d9 [SideSheet] Prevent NullPointerException when viewRef was nullified and only then accessed by runAfterLayout lambda
Resolves https://github.com/material-components/material-components-android/pull/4974

  - 93ab09b1f1591b9b1d1055545325a0f1f6fe08f8 by Eugene Golushkov <e.golushkov@nospam-gmail.com>

PiperOrigin-RevId: 846288956
2025-12-19 13:50:14 +00:00
Material Design Team
71d88f59ee [TimePicker] Fix ClockFaceView cropping in split-screen
Cropping occurred because `ClockFaceView` size calculation ignored parent constraints and radius calculation didn't update on resize.

PiperOrigin-RevId: 846258916
2025-12-19 13:48:16 +00:00
hunterstich
71f014fa41 [Snackbar] Added optional close icon
PiperOrigin-RevId: 845256053
2025-12-17 14:23:55 +00:00
rightnao
d5934ee5ba [Lists] Support skipping the open swipe state so clients can go straight to the primary action
PiperOrigin-RevId: 843871144
2025-12-15 13:55:28 +00:00
rightnao
75f0a4e812 [Lists] Add getSwipeState method and demo, and refactored to set necessary swipe elements before drag so they are available for programmatic swipes
PiperOrigin-RevId: 842819821
2025-12-12 12:43:12 +00:00
pekingme
f86cedd44a [Button] Defer icon changes during width animation in MaterialButton.
This change introduces pending states for icon and icon size. When a width animation is active, calls to setIcon and setIconSize are deferred and applied only after the animation completes, preventing layout conflicts.

PiperOrigin-RevId: 840343132
2025-12-08 14:24:26 +00:00
Material Design Team
0b669dab7d [Slider] Adjust thumb-track gap only for the pressed thumb
The gap between the thumb and track is now calculated on the fly for each thumb, considering whether the thumb is currently pressed.

PiperOrigin-RevId: 839683792
2025-12-04 16:46:53 +00:00
rightnao
50bca3279a [Lists] Updates to styles
PiperOrigin-RevId: 837253230
2025-12-02 15:15:27 +00:00
Material Design Team
7fc1c4ff14 [Slider][A11y] Fix D-Pad focus trap on horizontal sliders.
On D-Pad controlled devices like Android TV, pressing up or down on a focused horizontal slider would change its value instead of moving focus to an adjacent UI element. This trapped users in the slider.

This CL fixes the focus trap by removing the key handlers for DPAD_UP and DPAD_DOWN, allowing the Android system to handle focus navigation as expected.

PiperOrigin-RevId: 837044072
2025-12-02 15:14:33 +00:00
rightnao
1dbfdd74d5 [Lists] Make SwipeableListItem and RevealableListItem public and add swipe state callback
PiperOrigin-RevId: 836752108
2025-12-02 15:05:54 +00:00
Material Design Team
dcd9898640 [DatePicker] Cache isFullscreen state in MaterialCalendar
PiperOrigin-RevId: 836142198
2025-11-24 12:44:22 -08:00
rightnao
93ae7307a0 [Lists] Add styles and theme overlays for material icon buttons inside lists
PiperOrigin-RevId: 834834478
2025-11-24 12:43:02 -08:00
rightnao
6310274b72 [List][Catalog] Address a11y issues
PiperOrigin-RevId: 834524481
2025-11-24 12:42:08 -08:00
Material Design Team
0153138811 [FloatingActionButton] Allow collapsed size to be set.
PiperOrigin-RevId: 834422708
2025-11-24 12:41:08 -08:00
Material Design Team
757f9f3db1 [DatePicker][A11y] Fix TAB keyboard trap and add DPAD month navigation.
This change fixes a keyboard trap in MaterialDatePicker where the TAB key focus was stuck within the month grid. TAB navigation is now limited to the days within the current month, allowing focus to move out of the picker.

For navigating between months, this change introduces DPAD (left/right arrow key) navigation. When on the first or last valid day of the month, the arrow keys will navigate to the previous or next month.

This CL also prevents keyboard focus from landing on disabled dates. Since GridView does not natively support skipping disabled items, custom logic has been added to find and focus on the nearest valid day during keyboard navigation.

Finally, a bug that caused focus to incorrectly jump to a previous, non-visible month during TAB navigation has been fixed. This was caused by RecyclerView's view-recycling mechanism. The solution ensures that only the currently visible month is focusable, preventing focus from moving to off-screen months.

PiperOrigin-RevId: 834271529
2025-11-19 08:41:58 -08:00
rightnao
32e9fb21b2 [Lists] Add attr for min child width
PiperOrigin-RevId: 833521355
2025-11-19 08:39:17 -08:00
rightnao
f30777111e [SearchView] Make SearchView root unfocusable
PiperOrigin-RevId: 833520163
2025-11-19 08:30:34 -08:00
rightnao
176e92d3c3 [Lists] Support RTL swiping
PiperOrigin-RevId: 833469324
2025-11-19 08:29:02 -08:00
rightnao
3e5a7fdb44 [Lists] Added onSwipeStateChanged callback, drawable swiped state for ListCardView, and alpha changes to swiped view as it reaches the swipe-to-action state
PiperOrigin-RevId: 833409689
2025-11-17 21:09:21 +00:00
rightnao
3c1a61c3dd [Lists] Add styles for control elements in lists
PiperOrigin-RevId: 832010671
2025-11-17 21:08:16 +00:00
rightnao
69e9676e48 [Lists] Re-measure intrinsic width when measure specs change
PiperOrigin-RevId: 832002199
2025-11-17 21:07:11 +00:00
rightnao
692bd113ad [Lists] Add more optional styles and update demos to show more variety of sample list content
PiperOrigin-RevId: 831979827
2025-11-17 21:05:48 +00:00
rightnao
235e8cfe71 Automated g4 rollback of changelist 816428327
PiperOrigin-RevId: 831030528
2025-11-17 21:04:30 +00:00
rightnao
0e1724824a [NavigationView] Set navigation menu item's a11y role description so it doesn't default to 'radio button' due to being checkable
PiperOrigin-RevId: 830619106
2025-11-11 18:49:41 +00:00
pekingme
9a8272d9c1 [Shape] Updated isRoundRectCornerMorph and pathDirty logic in MaterialShapeDrawable
PiperOrigin-RevId: 829468349
2025-11-07 17:58:47 +00:00
rightnao
07a3be50c2 [Lists] Add swipe for action state
PiperOrigin-RevId: 828603206
2025-11-07 17:57:33 +00:00
Material Design Team
2e04704341 [Internal change] Removed references to the AndroidJdkLibsChecker Error Prone check
PiperOrigin-RevId: 828144964
2025-11-07 17:56:28 +00:00
leticiars
c4d19f6f7d [Slider] Fix ACTION_CANCEL motion touch event handling so that the slider resets its state if a cancel happens. Also don't let slider update incorrectly when a touch event may be overlapping with back gesture inset areas, as the back event takes precedence.
PiperOrigin-RevId: 828106972
2025-11-07 17:51:26 +00:00
pekingme
90a8043ad3 [Shape] Code format.
PiperOrigin-RevId: 828094095
2025-11-07 17:49:44 +00:00
pekingme
ea9d25050c [Shape] Always skip corner morph animation on bounds change in MaterialShapeDrawable.
PiperOrigin-RevId: 827536893
2025-11-07 17:48:18 +00:00
Material Design Team
a207114c60 [DatePicker] Add MonthAdapter helpers for finding enabled days
This change introduces helper methods to `MonthAdapter` to allow callers to identify days that are enabled according to the `CalendarConstraints`.

PiperOrigin-RevId: 826466043
2025-10-31 21:09:45 +00:00