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
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
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
- 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
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
- 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
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
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
- 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
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