227 Commits

Author SHA1 Message Date
pekingme
40d1be5bba [I18n] Updated translation strings.
PiperOrigin-RevId: 861779608
2026-01-27 18:30:09 +00:00
pekingme
57f3cdbda3 [Tokens] Updated token version to 31.0.0
PiperOrigin-RevId: 859699661
2026-01-22 19:49:30 +00:00
dsn5ft
00e5edac88 [i18n] Update string translations
(copyright year + snackbar close button content description)

PiperOrigin-RevId: 853819674
2026-01-12 16:16:19 +00:00
Material Design Team
1fd35bc7e8 [DatePicker] Add tooltips to icon buttons
Adds tooltips to the month navigation buttons in MaterialCalendar and the header toggle button in MaterialDatePicker

PiperOrigin-RevId: 853333712
2026-01-08 18:00:48 +00:00
Material Design Team
dcd9898640 [DatePicker] Cache isFullscreen state in MaterialCalendar
PiperOrigin-RevId: 836142198
2025-11-24 12:44:22 -08:00
Material Design Team
757f9f3db1 [DatePicker][A11y] Fix TAB keyboard trap and add DPAD month navigation.
This change fixes a keyboard trap in MaterialDatePicker where the TAB key focus was stuck within the month grid. TAB navigation is now limited to the days within the current month, allowing focus to move out of the picker.

For navigating between months, this change introduces DPAD (left/right arrow key) navigation. When on the first or last valid day of the month, the arrow keys will navigate to the previous or next month.

This CL also prevents keyboard focus from landing on disabled dates. Since GridView does not natively support skipping disabled items, custom logic has been added to find and focus on the nearest valid day during keyboard navigation.

Finally, a bug that caused focus to incorrectly jump to a previous, non-visible month during TAB navigation has been fixed. This was caused by RecyclerView's view-recycling mechanism. The solution ensures that only the currently visible month is focusable, preventing focus from moving to off-screen months.

PiperOrigin-RevId: 834271529
2025-11-19 08:41:58 -08:00
Material Design Team
a207114c60 [DatePicker] Add MonthAdapter helpers for finding enabled days
This change introduces helper methods to `MonthAdapter` to allow callers to identify days that are enabled according to the `CalendarConstraints`.

PiperOrigin-RevId: 826466043
2025-10-31 21:09:45 +00:00
dsn5ft
ab3333915a [i18n] Update library string translations
PiperOrigin-RevId: 788056533
2025-07-28 17:12:44 +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
pfthomas
3e5c1a87dd [DatePicker] Enable autosizing for day of week labels
PiperOrigin-RevId: 776715246
2025-06-27 22:05:38 +00:00
kendricku
7c162ef28c [DatePicker] Fix Talkback issues with the hint text by adding a TtsSpan.TYPE_VERBATIM so that the hints are read as verbatim text by screen readers.
PiperOrigin-RevId: 776123945
2025-06-27 16:28:30 +00:00
hunterstich
eb935e60b0 [Process] Updated component string translations
PiperOrigin-RevId: 772911687
2025-06-18 14:32:40 +00:00
Material Design Team
787ad71352 [Date Picker][A11y] Replace deprecated announcement API with accessibility pane title
PiperOrigin-RevId: 771083111
2025-06-18 14:13:04 +00:00
Material Design Team
f843ab0f1f [Date Picker] Avoid re-creating text input picker fragment on configuration changes
Addresses an issue where the input text view was losing entered text and cursor position during configuration changes.

PiperOrigin-RevId: 769580976
2025-06-10 19:32:18 +00:00
Material Design Team
65e7d8afc4 [DatePicker] Set cursor to end of input text field when input is opened
PiperOrigin-RevId: 766655654
2025-06-03 15:36:25 +00:00
Material Design Team
91e6a97a58 [DatePicker][A11y] Replace the deprecated announcement API used for month navigation
PiperOrigin-RevId: 760547908
2025-05-19 14:34:27 +00:00
Material Design Team
39dd3a4235 [DatePicker][A11y] Fix accessibility focus landing on first day of month after year selection
After selecting a year, accessibility focus now correctly returns to the calendar/year selection button instead of jumping to the first day of the month. Also disabled RecyclerView animations when TalkBack is enabled to prevent incorrect date announcements during transitions.

PiperOrigin-RevId: 745964584
2025-04-17 23:55:05 +00:00
kendricku
9fd5a67c9f [i18n][Datepicker] Translate fixed a11y announcements.
PiperOrigin-RevId: 743598030
2025-04-07 14:33:11 +00:00
Material Design Team
41f507977e [MaterialDatePicker] Fix DatePicker to use correct accessibility description for calendar/year view toggle button.
Change TalkBack announcement from
'month year. Tap to switch to year/calendar view. Double tap to activate'
to
'month year. Double tap to switch to year/calendar view'

PiperOrigin-RevId: 740445584
2025-03-26 16:18:47 +00:00
rightnao
37adad28af [Tokens] Update tokens to 16.0.2
PiperOrigin-RevId: 739249542
2025-03-24 15:27:25 +00:00
Material Design Team
71287c67dd [MaterialDatePicker][A11y] Disable next/prev button when the selected month is at the boundary
When user clicks on previous/next month button, the button will be disabled if the clicked month is at the boundary.

PiperOrigin-RevId: 738309727
2025-03-19 18:25:59 +00:00
pekingme
67b6dcebe5 [Tokens] Upgraded to 15.0.26
PiperOrigin-RevId: 731761144
2025-03-03 19:50:32 +00:00
hunterstich
9f528510c3 [Translations] Updated string translations
PiperOrigin-RevId: 731461284
2025-03-03 19:49:49 +00:00
pekingme
c39dc388b3 [Tokens] Upgraded to version 15.0.12.
PiperOrigin-RevId: 730510849
2025-02-25 19:32:33 +00:00
pfthomas
fd2e9bcdf6 [DatePicker] Prevent keyboard from automatically showing with TalkBack
PiperOrigin-RevId: 729239261
2025-02-25 19:19:52 +00:00
pekingme
7c5dce0f82 [Tokens] Updated to 14.0.0.
PiperOrigin-RevId: 728471950
2025-02-20 15:36:11 +00:00
pekingme
9a2890c249 [Resources] Updated translated string resources.
Resolves https://github.com/material-components/material-components-android/issues/4553

PiperOrigin-RevId: 720282586
2025-01-28 19:47:24 +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
pekingme
4f7bf293ea [Tokens] Updated token outputs to v13.2.0 and integrated new AppBar tokens.
PiperOrigin-RevId: 703208208
2024-12-10 17:57:50 +00:00
pubiqq
c1c19c8b3a [Internal] Update targetApi suppressions in resources
Resolves https://github.com/material-components/material-components-android/pull/4308

GIT_ORIGIN_REV_ID=8016db9460e4e1013e56a50e541406ff356e2837
PiperOrigin-RevId: 702111281
2024-12-04 23:58:23 +00:00
pubiqq
767f25aa49 [Docs] Fix javadoc links
Resolves https://github.com/material-components/material-components-android/pull/4333

GIT_ORIGIN_REV_ID=61739e430bcda13086b83015e4054d7e318cd0d5
PiperOrigin-RevId: 700775734
2024-12-02 20:07:07 +00:00
pfthomas
f141ed3ba2 [DatePicker][a11y] Fix contrast for hint color
PiperOrigin-RevId: 678345966
2024-09-25 14:28:37 +00:00
dsn5ft
18fd815e42 [i18n] Update string translations for date picker and loading indicator
PiperOrigin-RevId: 678318957
2024-09-25 14:26:03 +00:00
pubiqq
b77824fcc7 [Internal] Remove pre-Lollipop resources
Resolves https://github.com/material-components/material-components-android/pull/4280

GIT_ORIGIN_REV_ID=88ee02b5c93b51a154503b7a1f1b85ddeea3cb57
PiperOrigin-RevId: 676472901
2024-09-20 19:49:20 +00:00
pekingme
47cbd7e81a [Tokens] Upgraded to 10.0.1
PiperOrigin-RevId: 676467444
2024-09-20 19:48:02 +00:00
pfthomas
d049a427c4 [DatePicker][a11y] Properly announce selected year
PiperOrigin-RevId: 676374895
2024-09-20 19:44:02 +00:00
pfthomas
c06ef1bc86 [DatePicker][a11y] Properly announce the change of selection between year/day
PiperOrigin-RevId: 675901350
2024-09-19 19:46:56 +00:00
leticiars
8932a81ea4 [DatePicker] Update header layout to include horizontal insets so that buttons are not overlapped by navigation system UI in fullscreen mode.
Resolves https://github.com/material-components/material-components-android/issues/3956

PiperOrigin-RevId: 675552238
2024-09-19 15:01:06 +00:00
pubiqq
23aca03255 [Internal] Remove pre-Lollipop checks
Resolves https://github.com/material-components/material-components-android/pull/4266

GIT_ORIGIN_REV_ID=1de7808e66dd6666c893217c76c7499afe2df6a3
PiperOrigin-RevId: 669688797
2024-09-03 13:31:29 +00:00
pekingme
87076dd20b [Tokens] Upgraded to 8.0.0.
PiperOrigin-RevId: 669673113
2024-09-03 13:28:26 +00:00
pekingme
9188b8f6ab [Tokens] Upgraded to 7.1.0.
PiperOrigin-RevId: 669087033
2024-08-30 18:49:53 +00:00
pekingme
b65df32b0f [Tokens] Upgraded to 7.0.0
PiperOrigin-RevId: 668133320
2024-08-28 22:34:40 +00:00
pekingme
8731cad96a [Tokens] Upgraded to v6.1.0.
PiperOrigin-RevId: 665569215
2024-08-21 17:24:43 +00:00
pekingme
da0b738679 [Tokens] Upgraded to v5.0.0.
PiperOrigin-RevId: 663358341
2024-08-16 17:33:16 +00:00
pfthomas
6617342f03 [DatePicker] Make picker not final and expose onPositiveButtonClick and onNegativeButtonClick
Resolves https://github.com/material-components/material-components-android/issues/1688

PiperOrigin-RevId: 651106986
2024-07-10 19:26:51 +00:00
kendricku
cd0a0f0235 [i18n] Update string translations.
Resolves https://github.com/material-components/material-components-android/issues/4177

PiperOrigin-RevId: 647723414
2024-07-01 18:59:32 +00:00
pfthomas
6862b6f248 [DatePicker] Make header not focusable
PiperOrigin-RevId: 642318050
2024-06-11 19:01:27 +00:00
pfthomas
86a3b35aa2 [DatePicker] Prevent empty views at the end of a month to receive key events
PiperOrigin-RevId: 640991014
2024-06-11 18:55:24 +00:00
dsn5ft
9b6ceac72a [i18n] Update string translations
PiperOrigin-RevId: 633623911
2024-05-14 17:16:18 +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