3807 Commits

Author SHA1 Message Date
Material Design Team
aa623f0fac [Slider][A11y] Fix slider D-Pad keys to modify value instead of focus
Previously, Up/Down arrow keys navigated focus instead of changing the slider value. This change updates keyboard handling so all D-Pad keys modify the slider value: Up/Down increment/decrement the value, and Left/Right increment/decrement based on layout direction.

PiperOrigin-RevId: 821593460
2025-10-20 14:53:21 +00:00
rightnao
a5be0f7eed [Lists] Fix issue where the first drag may have not clamped to the end properly since originalContentLeft is 0
PiperOrigin-RevId: 820474927
2025-10-20 14:52:34 +00:00
leticiars
ce092fa5dd [Slider] Only one value label should be shown at a time for the range slider (except for the mode where the labels are always visible).
PiperOrigin-RevId: 819785653
2025-10-20 14:51:18 +00:00
rightnao
400d695bc5 [Lists] Add ListItemRevealLayout, ListItemCardView, and relevant interfaces to introduce swiping in ListItemLayout
PiperOrigin-RevId: 818827578
2025-10-14 19:02:04 +00:00
pekingme
04c849e2ce [Shape] Internal feature.
PiperOrigin-RevId: 818748582
2025-10-14 19:00:54 +00:00
rightnao
32362922af [Lists] Add ViewDragHelper
PiperOrigin-RevId: 818740364
2025-10-14 18:59:39 +00:00
rightnao
4e4e8f3388 [BottomSheet] Add support for Nested Scrolling with multiple nested scroll children.
PiperOrigin-RevId: 817350806
2025-10-10 19:10:21 +00:00
Material Design Team
54be28bd3d Automated g4 rollback of changelist 817143878
PiperOrigin-RevId: 817183622
2025-10-10 19:09:47 +00:00
Gaëtan Muller
41311caffc [Snackbar] Remove TODOs about Robolectric shadows
Resolves https://github.com/material-components/material-components-android/pull/4735

  - 0f6faacc5cae8272a5b4c72f8c7ff243db1642d9 by Gaëtan Muller <m.gaetan89@gmail.com>

PiperOrigin-RevId: 817143878
2025-10-10 18:11:08 +00:00
rightnao
d35634cfd2 Automated g4 rollback of changelist 814296973
PiperOrigin-RevId: 816428327
2025-10-10 18:08:04 +00:00
leticiars
ee52adbf05 [TopAppBar][a11y] Remove special key shortcut and keyboard navigation cluster for top app bar for correct keyboard navigation a11y.
PiperOrigin-RevId: 816305551
2025-10-07 19:55:50 +00:00
Material Design Team
3d8d23dadb [Slider][A11y] Use arrow keys for value adjustment and TAB for navigation
Refactors Slider/RangeSlider keyboard navigation for a more intuitive and accessible experience, removing the need to press ENTER to toggle between navigation and value adjustment modes.

With this change:

- Arrow keys (+/-/=/DPAD) always adjust the value of the focused thumb.
- TAB and Shift+TAB always navigate focus between thumbs.

This simplifies event handling by ensuring `activeThumbIdx` stays synchronized with `focusedThumbIdx` during keyboard input.

Also fixes regressions in `SliderTouchTest` by preventing `onFocusChanged` logic (now conditioned on `activeThumbIdx == -1`) from incorrectly overriding thumb selection during touch events.

PiperOrigin-RevId: 816168251
2025-10-07 19:55:02 +00:00
Material Design Team
405085752e [TimePicker][A11y] Fixed: accessibility announces stale data in TimePicker input
When clearing the hour or minute field in keyboard input mode, screen readers would incorrectly announce the previous value instead of announcing that the field is blank.

This is fixed by updating the `AccessibilityDelegateCompat` to read `editText.getText()` directly in `onInitializeAccessibilityNodeInfo`, ensuring it always reports the most current text value to accessibility services.

As part of this fix, the delegate is now created once and reused. This is a performance improvement that avoids creating a new delegate object each time the text content changes.

PiperOrigin-RevId: 814635548
2025-10-07 19:52:59 +00:00
pekingme
bbd1292567 [Shape] Optimized path calculation in MaterialShapeDrawable.
Added a check for `shouldCalculatePath()` before recalculating the fill and stroke paths during drawing. This prevents unnecessary path calculations when the shape is not visible or doesn't need path updates.

PiperOrigin-RevId: 814298357
2025-10-07 19:52:25 +00:00
rightnao
9366a84020 [Search] Block keyboard focus on other views when SearchView is open
PiperOrigin-RevId: 814296973
2025-10-07 19:51:36 +00:00
hunterstich
1867bb01e0 [Chip] Fixed chip group forcing importantForAccessibility=yes
Resolves https://github.com/material-components/material-components-android/issues/4946

PiperOrigin-RevId: 813732033
2025-10-07 19:51:06 +00:00
rightnao
d06eed1429 [Search][A11y] Allow keyboard navigation between searchbar and other components
PiperOrigin-RevId: 811869184
2025-09-30 18:24:09 +00:00
pfthomas
00a64e28a6 [TimePicker] Update error colors
PiperOrigin-RevId: 811396442
2025-09-30 18:21:47 +00:00
pfthomas
2cbd7b08ba [i18n] Update string translations
PiperOrigin-RevId: 811356306
2025-09-25 15:11:22 +00:00
pfthomas
9d8506a020 [TimePicker] Accessibility focus on error
Move the accessibility focus back to the error when clicking "OK".

PiperOrigin-RevId: 810864879
2025-09-24 21:32:52 +00:00
hunterstich
de5730e0d1 [Chip] Fixed fontVariationSettings from TextAppearance being overwritten in ChipDrawable.
PiperOrigin-RevId: 808166113
2025-09-18 16:50:17 +00:00
pfthomas
5f7634f919 [TimePicker] Fix error beep sound
Resolves https://github.com/material-components/material-components-android/issues/4923

PiperOrigin-RevId: 807819996
2025-09-18 16:49:17 +00:00
hunterstich
fb7ae01348 [Chip] Added support for variable font axes
PiperOrigin-RevId: 807265798
2025-09-18 16:48:13 +00:00
hunterstich
c2051db2a9 [Internal] Avoid calling deprecated edge-to-edge APIs on 35+
Resolves https://github.com/material-components/material-components-android/issues/4626
Resolves https://github.com/material-components/material-components-android/issues/4507
Resolves https://github.com/material-components/material-components-android/issues/4732
Resolves https://github.com/material-components/material-components-android/issues/4607
Resolves https://github.com/material-components/material-components-android/pull/4883

PiperOrigin-RevId: 800945380
2025-08-29 11:48:28 -07:00
rightnao
c99cba6a76 [MaterialCardView] Add drawable states that MaterialCardView should still respect, even if duplicating its parent state
PiperOrigin-RevId: 800720830
2025-08-29 11:47:44 -07:00
rightnao
14a6267605 [Lists] Add selector for optional leading icon
PiperOrigin-RevId: 800665410
2025-08-29 11:46:11 -07:00
pfthomas
d241d48bb0 [TimePicker][a11y] Error handling update
- properly show the chip background color when selected
- add error state with message when the hour/minute is incorrect, giving the user a visual feedback instead of just preventing inputting an incorrect value
- add vibration and beep on error or max length reached

PiperOrigin-RevId: 800583067
2025-08-29 11:45:22 -07:00
pekingme
7c66a2ef94 [ButtonGroup] Added the "wrap" overflow mode.
If the "wrap" overflow mode is in use, the button group will wrap the buttons that don't fit in one row to more rows below.

PiperOrigin-RevId: 800551513
2025-08-29 11:44:37 -07:00
pekingme
4c74b80de2 [ProgressIndicator] Added an API to automatically hide the indicator after it reaches max progress.
PiperOrigin-RevId: 800169008
2025-08-29 11:42:18 -07:00
Material Design Team
b13d967f0b Automated g4 rollback of changelist 799921970
PiperOrigin-RevId: 799988158
2025-08-27 13:41:49 -07:00
pfthomas
d2cce659d1 [TimePicker][a11y] Error handling update
- properly show the chip background color when selected
- add error state with message when the hour/minute is incorrect, giving the user a visual feedback instead of just preventing inputting an incorrect value
- add vibration and beep on error or max length reached

PiperOrigin-RevId: 799921970
2025-08-27 13:41:00 -07:00
pekingme
659e3bcb6d [ProgressIndicator] Updated SpringAnimation's minimum visible change and added APIs to customize spring force in DeterminateDrawable.
PiperOrigin-RevId: 798225060
2025-08-27 13:37:26 -07:00
Material Design Team
e69709f5fa [TimePicker][A11y] Add tooltip to MaterialTimePicker mode toggle button
Refactored the logic for retrieving the toggle button's icon and content description into separate methods and added a tooltip to the mode toggle button.

PiperOrigin-RevId: 797722507
2025-08-27 13:35:50 -07:00
rightnao
c38892019c [Lists] Updating List catalog demo to spec
PiperOrigin-RevId: 797102136
2025-08-20 14:57:05 +00:00
Material Design Team
089372f249 [TimePicker][A11y] Add keyboard support to clock input mode
Enables focus on the `ClockFaceView` and implements `onKeyDown` to allow users to navigate between clock values using DPAD keys. DPAD_RIGHT/UP increments the selected value, while DPAD_LEFT/DOWN decrements it.

PiperOrigin-RevId: 796951982
2025-08-20 14:54:18 +00:00
pubiqq
78189012da [BottomNavigation] Fix navigation item layout in non-compact windows
Resolves https://github.com/material-components/material-components-android/pull/4793

  - 7277b3745c15b6058b59009380d3ce45533a76d2 by pubiqq <serj.ese@gmail.com>

PiperOrigin-RevId: 796946899
2025-08-20 14:53:17 +00:00
conradchen
4449354013 Automated g4 rollback of changelist 796431568
PiperOrigin-RevId: 796863604
2025-08-20 14:52:46 +00:00
pekingme
c092695afd [ProgressIndicator] Updated SpringAnimation's minimum visible change and added APIs to customize spring force in DeterminateDrawable.
PiperOrigin-RevId: 796431568
2025-08-20 14:52:07 +00:00
Material Design Team
c7fa5dc6e9 [TextField][A11y] Add tooltip support to TextInputLayout icons
- The icon's `contentDescription` is used as the tooltip text.
- Tooltips are only shown for icons that are interactive (focusable). Decorative-only icons will not display a tooltip.
- `CheckableImageButton` is updated to provide a callback for when its focusable state changes, which is used to trigger tooltip updates.
- API-level differences are handled to ensure that custom `OnLongClickListeners` are not overridden by the tooltip's long-press listener on older platforms (pre-API 26).

PiperOrigin-RevId: 794951524
2025-08-20 14:50:08 +00:00
rightnao
babc9fc05e [List] Added Multi section ListItemViewHolder bind method and demo
PiperOrigin-RevId: 793813888
2025-08-20 14:49:25 +00:00
rightnao
ab86a01e9f [Lists] Added segmented list style, public attrs, and catalog demos
PiperOrigin-RevId: 793796271
2025-08-20 14:48:46 +00:00
pekingme
ac82767b56 [LoadingIndicator] Added showDelay and minHideDelay attribute.
Resolves https://github.com/material-components/material-components-android/issues/4799

PiperOrigin-RevId: 793449299
2025-08-20 14:48:01 +00:00
pekingme
90a1f22efb [ProgressIndicator] Moved showDelay and minHideDelay attrs to resources module.
PiperOrigin-RevId: 793441910
2025-08-20 14:47:12 +00:00
rightnao
3c332f9a27 [Lists] Introduce ListItemLayout and ListItemViewHolder with catalog demo
PiperOrigin-RevId: 791886366
2025-08-08 17:47:51 +00:00
dsn5ft
015e0534e1 [Toolbar] Add support for navigation button with circle background
PiperOrigin-RevId: 790777821
2025-08-04 20:30:43 +00:00
rightnao
7fe9ef9e06 [Theme] Added missing Shape Attributes to Dialog themes
PiperOrigin-RevId: 789801786
2025-08-01 18:38:18 +00:00
dsn5ft
ab3333915a [i18n] Update library string translations
PiperOrigin-RevId: 788056533
2025-07-28 17:12:44 +00:00
Material Design Team
d8cc690b51 [ExposedDropdownMenu][A11y] Add keyboard support for dropdown menus
PiperOrigin-RevId: 788007779
2025-07-28 17:10:55 +00:00
Material Design Team
223bf15468 [DatePicker] Fix header layout overlapping in landscape
Replaced the FrameLayout in the landscape header with a ConstraintLayout to prevent the title and selection text from overlapping. Enabled autoSizeTextType on the selection text view to handle long text.

PiperOrigin-RevId: 786244700
2025-07-24 18:35:18 +00:00
rightnao
2f0935a706 [Card] Support StateListShapeAppearance in MaterialCardView
PiperOrigin-RevId: 785529211
2025-07-24 18:34:07 +00:00