42 Commits

Author SHA1 Message Date
pfthomas
6c4db77711 [MaterialTimePicker] Use ViewCompat.performHapticFeedback
Resolves https://github.com/material-components/material-components-android/issues/4948

PiperOrigin-RevId: 822672441
2025-10-31 18:48:11 +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
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
pfthomas
dcfe2ee9ee [TimePicker] Default to text input mode in landscape
PiperOrigin-RevId: 775714779
2025-06-27 16:16:52 +00:00
ls9487
167451b532 [MaterialTimePicker] set time wrongly in TimeFormat.CLOCK_12H
Resolves https://github.com/material-components/material-components-android/pull/4495

GIT_ORIGIN_REV_ID=6f77987cc4d65033173a70c86d5ecf1e9ad1268e
PiperOrigin-RevId: 766649090
2025-06-03 15:35:46 +00:00
pubiqq
bc2fdeadaf [Internal] Prefer platform methods to compat ones
Resolves https://github.com/material-components/material-components-android/pull/4532

GIT_ORIGIN_REV_ID=180dec736f2521579e483317a4d537629d8f247b
PiperOrigin-RevId: 715494344
2025-01-15 18:06:07 +00:00
rightnao
e3b255b3a0 [Docs] Crosslink github docs in javadocs
PiperOrigin-RevId: 546393704
2023-07-11 19:37:37 +00:00
pekingme
5f542c8946 [TimePicker] Made dialog container color configurable in xml style.
PiperOrigin-RevId: 519184711
2023-03-24 18:08:08 +00:00
pfthomas
6f0a953c2b [MaterialTimePicker] Fix NPE
PiperOrigin-RevId: 503974850
2023-01-24 11:54:14 -05:00
pfthomas
15c7128630 [MaterialTimePicker] Fix keyboard not showing at first in text input mode
PiperOrigin-RevId: 478500505
2022-10-03 19:15:55 +00:00
Material Design Team
44cc9b745c Add @CanIgnoreReturnValue to some APIs that return this.
PiperOrigin-RevId: 468721442
2022-08-22 15:22:27 -04:00
pfthomas
cbc0711ca3 [MaterialTimePicker][24H Redesign] 2-ring support for 24H clock
Resolves https://github.com/material-components/material-components-android/issues/1450

This replaces the current implementation of the 24H clock mode from 1 ring to 2 rings.
The 24H picker now also defaults to text input mode.

PiperOrigin-RevId: 463652374
2022-07-28 17:42:05 -04:00
pfthomas
85a44054f3 [MaterialTimePicker] Add setters for hour and minute
Resolves https://github.com/material-components/material-components-android/issues/2515

PiperOrigin-RevId: 428563049
2022-02-15 19:24:16 +00:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
dsn5ft
3a57f5d58b [TimePicker] Attempt to fix onDoubleTap() NullPointerException
PiperOrigin-RevId: 404651939
2021-10-21 18:54:41 +00:00
dsn5ft
93cdd95d6a [TimePicker] Make MaterialTimePicker implement OnDoubleTapListener interface instead of instantiating anonymous inner class
PiperOrigin-RevId: 403415529
2021-10-18 12:37:06 -04:00
nikhiljainlive
0181029efb [MaterialTimePicker] Fix Input mode is not changed when keyboard icon is clicked when the app is returned from background
Resolves https://github.com/material-components/material-components-android/pull/2419

GIT_ORIGIN_REV_ID=80ba4c214cbd565ad461bef80fb9ae01b8671a0e
PiperOrigin-RevId: 402550766
2021-10-12 11:40:24 -04:00
conradchen
168c69189e [TimePicker] Add ability to customize positive and negative button
Resolves https://github.com/material-components/material-components-android/issues/2275

PiperOrigin-RevId: 398010381
2021-09-23 19:15:42 +00:00
pfthomas
00c0df9e7d [TimePicker][Accessibility] Send accessibility event when updating input mode
PiperOrigin-RevId: 397080648
2021-09-20 09:31:49 -07:00
dsn5ft
45f4fa0ac8 [MaterialTimePicker] Add some defensive null checks for internal views
PiperOrigin-RevId: 390608782
2021-08-16 13:43:58 -07:00
conradchen
35c2af3c2d [TimePicker] Hide cancel button when it's not cancelable
Resolves https://github.com/material-components/material-components-android/issues/2245

PiperOrigin-RevId: 381268475
2021-06-28 12:54:41 -07:00
conradchen
b38a09f93e Automated g4 rollback of changelist 369683837
PiperOrigin-RevId: 369704013
2021-04-22 14:53:14 -04:00
Material Design Team
3891ca6c57 Automated g4 rollback of changelist 369658517
PiperOrigin-RevId: 369683837
2021-04-21 14:46:06 -04:00
conradchen
f617557ff9 [Color] Fix elevation overlay on time pickers
PiperOrigin-RevId: 369658517
2021-04-21 14:44:36 -04:00
Anoop
64164677a9 [Material TimePicker] Added setTheme api in builder to support passing theme via builder
Resolves https://github.com/material-components/material-components-android/pull/2098

GIT_ORIGIN_REV_ID=688015d7a73fa28478e34da40363ac9c5730d677
PiperOrigin-RevId: 363648438
2021-03-18 12:51:22 -04:00
marianomartin
11169ce616 [TimePicker] Fixed issues when re using dialog instance
Resolves https://github.com/material-components/material-components-android/issues/1995

PiperOrigin-RevId: 352610118
2021-01-19 15:17:01 -08:00
marianomartin
cbef0d3c1b [TimePicker] Change text input view to a view stub
PiperOrigin-RevId: 347387465
2020-12-14 15:10:26 -05:00
marianomartin
074ed18255 [TimePicker] Remove hint setting
PiperOrigin-RevId: 345071902
2020-12-02 10:07:59 -05:00
marianomartin
8da7336e89 [TimePicker] Added a style for timepicker to customize icons
PiperOrigin-RevId: 337525216
2020-10-19 05:54:54 -07:00
Gabriele Mariotti
a4b008e742 [MaterialTimePicker] Fixed ClassCastException with a Bridge Theme
Resolves https://github.com/material-components/material-components-android/pull/1736

GIT_ORIGIN_REV_ID=c94c507b222fc8b1d97fb2018f65acbcbc9ce90b
PiperOrigin-RevId: 334674979
2020-09-30 17:19:29 -04:00
marianomartin
bad81310d3 [TimePicker] Added the ability to switch to text input mode when double tapping the selected number
PiperOrigin-RevId: 334385102
2020-09-29 09:18:23 -07:00
marianomartin
4fa13416ec [TimePicker] Added content description to button to switch input modes
PiperOrigin-RevId: 333398589
2020-09-24 09:00:07 -07:00
marianomartin
91c972c7f3 [MaterialTimePicker] Added setters for the title string
PiperOrigin-RevId: 332028135
2020-09-16 11:47:20 -07:00
marianomartin
c0be2c0cb1 [MaterialTimePicker] Documented hour and minutes ranges
PiperOrigin-RevId: 331209662
2020-09-15 09:20:55 -07:00
marianomartin
0aed26b8b7 [TimePicker] Changed positive listener to be an OnClickListener
PiperOrigin-RevId: 328539995
2020-08-26 17:39:31 -04:00
marianomartin
dbbd27cefc [TimePicker] Removed newInstance method in favor of Builder Class
Resolves https://github.com/material-components/material-components-android/issues/1512

PiperOrigin-RevId: 324248187
2020-07-31 15:42:47 -04:00
Gabriele Mariotti
2ccc71624e [TimePicker] Added listeners
Resolves https://github.com/material-components/material-components-android/pull/1517

GIT_ORIGIN_REV_ID=be2559a45bff94592537183d46659df5a2a91056
PiperOrigin-RevId: 324215552
2020-07-31 15:05:17 -04:00
marianomartin
8ea36ae200 [TimePicker] Removed checkable from timepicker mode button
PiperOrigin-RevId: 323616442
2020-07-29 09:16:41 -04:00
marianomartin
702c201508 [TimePicker] Renamed classes to match MaterialDatePicker
PiperOrigin-RevId: 320993387
2020-07-15 09:45:57 -07:00