26 Commits

Author SHA1 Message Date
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
pfthomas
00a64e28a6 [TimePicker] Update error colors
PiperOrigin-RevId: 811396442
2025-09-30 18:21:47 +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
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
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
pfthomas
b5aee6682c [TimePicker][a11y] Set accessibilityDelegate for time announcement when editing
Also set `hintText` to announce hour/minute with the number.

PiperOrigin-RevId: 771085617
2025-06-18 14:15:00 +00:00
pfthomas
2d73a5dca6 [TimePicker][a11y] Set accessibilityDelegate for time announcement when editing
PiperOrigin-RevId: 767673170
2025-06-05 18:41:20 +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
4032a74112 [MaterialDatePicker] Fix keyboard not showing at first in text input mode
Resolves https://github.com/material-components/material-components-android/issues/2747

PiperOrigin-RevId: 511501130
2023-02-23 03:46:22 -08:00
pekingme
14fa66a2a9 [TimePicker] Integrated M3 tokens.
PiperOrigin-RevId: 493059854
2022-12-05 15:13:23 -05:00
pfthomas
0c204b8212 [MaterialTimePicker] Fix NumberFormatException
PiperOrigin-RevId: 482810027
2022-10-21 16:31:08 +00:00
pfthomas
56ea071320 [MaterialTimePicker] Pre-fill hour and minute edit texts in text input mode
Resolves https://github.com/material-components/material-components-android/issues/2862

PiperOrigin-RevId: 479033062
2022-10-05 14:30:55 +00:00
pfthomas
9806ad99f7 [Internal][MaterialTimePicker] Revert pre-fill hour and minute edit texts in text input mode
PiperOrigin-RevId: 478603180
2022-10-04 20:43:49 +00:00
pfthomas
087da2f2bc [MaterialTimePicker] Pre-fill hour and minute edit texts in text input mode
Resolves https://github.com/material-components/material-components-android/issues/2862

PiperOrigin-RevId: 478507649
2022-10-03 19:16:44 +00:00
pfthomas
5b78bf4896 [MaterialTimePicker][a11y] Fix label for hour/minute EditTexts.
PiperOrigin-RevId: 443080572
2022-04-20 13:39:25 -04:00
pfthomas
0ba0d6540a [MaterialTimePicker][a11y] Make label important for accessibility
PiperOrigin-RevId: 437326760
2022-03-28 16:46:50 +00:00
pfthomas
a51d1dcb68 [MaterialTimePicker][a11y] Update accessibility className used for hour/minute Chips
PiperOrigin-RevId: 436207977
2022-03-21 18:53:24 +00:00
pfthomas
1b14715cde [MaterialTimePicker][a11y] Prevent TalkBack from announcing unavailable action
PiperOrigin-RevId: 432453483
2022-03-04 16:59:26 -05:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
pfthomas
e906367de5 [MaterialTimePicker] Fix showing keyboard requires 2 taps in text input mode
PiperOrigin-RevId: 402567146
2021-10-12 11:43:03 -04:00
marianomartin
76cf0eb07e [TimePicker] Fixed text input mode to correctly restore state
PiperOrigin-RevId: 350349289
2021-01-06 15:34:51 -05:00
marianomartin
074ed18255 [TimePicker] Remove hint setting
PiperOrigin-RevId: 345071902
2020-12-02 10:07:59 -05:00
marianomartin
a543032c99 [TimePicker] Support formatting the numbers depending on the configuration locale
PiperOrigin-RevId: 327666353
2020-08-20 16:47:25 -04:00
marianomartin
84cec15fbd [TimePicker] Fixed Talback support
PiperOrigin-RevId: 322589365
2020-07-22 14:24:23 -04:00
marianomartin
cd6b062519 [TimePicker] Added a TimePicker component
This should be considered a pre-alpha of timepicker.
Try the component today, on the latest snapshot:

https://github.com/material-components/material-components-android/blob/master/docs/using-snapshot-version.md

The initial API offers feature parity with android.app.TimePickerDialog

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

PiperOrigin-RevId: 318879238
2020-06-29 16:24:46 -04:00