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
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
In the Chip implementation, onCheckedChangeListener was called before onCheckedChangeListenerInternal. This causes an issue that in onCheckedChangeListener's callback, the checkable group's checked state is not updated yet, therefore ChipGroup.getCheckedChipIds() will return the outdated checked state.
Fixes this by overriding Chip.setOnCheckedChangeListener to get full control of the execution order between onCheckedChangeListener and onCheckedChangeListenerInternal.
Resolves https://github.com/material-components/material-components-android/issues/2691
PiperOrigin-RevId: 449100861