383 Commits

Author SHA1 Message Date
Material Design Team
c7fa5dc6e9 [TextField][A11y] Add tooltip support to TextInputLayout icons
- 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
2025-08-20 14:50:08 +00:00
Material Design Team
d8cc690b51 [ExposedDropdownMenu][A11y] Add keyboard support for dropdown menus
PiperOrigin-RevId: 788007779
2025-07-28 17:10:55 +00:00
Material Design Team
d438f09222 [TextField][A11y] Replace deprecated announceForAccessibility with accessibility live region
PiperOrigin-RevId: 762446288
2025-05-23 21:36:18 +00:00
rightnao
37adad28af [Tokens] Update tokens to 16.0.2
PiperOrigin-RevId: 739249542
2025-03-24 15:27:25 +00:00
dsn5ft
0697f6fe89 [Gradle] Enable non transitive R classes (resource namespacing) and fix errors
PiperOrigin-RevId: 738871402
2025-03-20 18:34:33 +00:00
pekingme
67b6dcebe5 [Tokens] Upgraded to 15.0.26
PiperOrigin-RevId: 731761144
2025-03-03 19:50:32 +00:00
pekingme
c39dc388b3 [Tokens] Upgraded to version 15.0.12.
PiperOrigin-RevId: 730510849
2025-02-25 19:32:33 +00:00
pekingme
7c5dce0f82 [Tokens] Updated to 14.0.0.
PiperOrigin-RevId: 728471950
2025-02-20 15:36:11 +00:00
Material Design Team
76dce7347b Automated g4 rollback of changelist 716328564
PiperOrigin-RevId: 720889049
2025-01-31 15:18:55 +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
e3a3093309 [Internal] Use monotonic clock to measure time intervals
Resolves https://github.com/material-components/material-components-android/pull/4289

GIT_ORIGIN_REV_ID=6686c2a3101c235c1fec087a0f77acbfecd23540
PiperOrigin-RevId: 718390534
2025-01-22 17:54:49 +00:00
conradchen
690bbfc917 [TextField] Fix the issue that menu items gets filtered after recreation
It's actually a bug of framework's AutoCompleteTextView. When restoring the
state, it always filters the item list regardless the previously input item
is from menu selection or manual input.

This change fixes the issue by implementing the custom logic of input text
saving/restoring, and properly remember if the last input text filters the
item list or not.

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

PiperOrigin-RevId: 716328564
2025-01-16 20:37:01 +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
pekingme
39be13c5c2 [Textfield] Fixed counter text order for locales AR.
PiperOrigin-RevId: 686993802
2024-10-18 16:59:41 +00:00
rightnao
7f01739644 [TextInputLayout] Add hintMaxLines attribute
PiperOrigin-RevId: 685884472
2024-10-15 16:51:14 +00:00
rightnao
246fa677b3 [TextInputLayout] Start outline cutout bounds at a y location of 0 to encompass any possible vertical shifts due to a size difference between the placeholder text and the edit text
PiperOrigin-RevId: 679308079
2024-10-01 18:39:27 +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
rightnao
f9aaf037f9 [Textfield] Set error icon to uncheckable
PiperOrigin-RevId: 676067853
2024-09-20 18:49:58 +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
pubiqq
204811089d [Internal] Replace deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4180

GIT_ORIGIN_REV_ID=8e4ec29abacc33cde748b8f07f0ba5c251cef395
PiperOrigin-RevId: 656004130
2024-07-25 19:09:36 +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
pfthomas
501ae367a1 [DatePicker] Fix arrangement of range text fields
- gives enough space for the text to not wrap when width too narrow

PiperOrigin-RevId: 632262914
2024-05-13 17:36:19 +00:00
Ga\u00ebtan Muller
b3fe6a7f61 [Cleanup] Remove redundant version checks for api <= 19.
Resolves https://github.com/material-components/material-components-android/pull/3849

GIT_ORIGIN_REV_ID=47bb2fcc8031740e5a7d4f741f1ada2af025e126
PiperOrigin-RevId: 632154861
2024-05-09 18:46:02 +00:00
pfthomas
9b09b693d9 [Tokens] Update tokens to v4.0.0
PiperOrigin-RevId: 626141198
2024-04-19 21:18:49 +00:00
pekingme
28cc2441d0 [Tokens] Updated to version 2.3.4.
PiperOrigin-RevId: 610835532
2024-02-29 08:36:02 -08:00
pekingme
ee7b4bddb4 [Tokens] Added formatting to break long lines and differentiate different comments.
PiperOrigin-RevId: 605684816
2024-02-12 18:03:59 +00:00
pekingme
89212044a9 [Tokens] Updated to v0.213.
PiperOrigin-RevId: 603749766
2024-02-06 14:30:16 +00:00
pekingme
08d7ded67b [Tokens] Upgraded to v0.207.
PiperOrigin-RevId: 600947836
2024-01-24 21:05:53 +00:00
Material Design Team
14a7b40363 [AutoComplete] Enabled switch access in MaterialAutoCompleteTextView.
PiperOrigin-RevId: 587556416
2023-12-04 15:51:51 +00:00
pekingme
9b9449cde1 [TextInputLayout] Limited the min height reset in text change listener only when line count changes.
PiperOrigin-RevId: 582049113
2023-11-13 20:58:05 +00:00
pekingme
4ccaaaa31d [Tokens] Upgraded to v0.203
PiperOrigin-RevId: 579928128
2023-11-08 15:12:21 +00:00
pekingme
637362d597 [Tokens] Upgraded to v0.195
PiperOrigin-RevId: 579905417
2023-11-06 20:27:15 +00:00
pekingme
0463c507d7 [Tokens] Upgraded to v0.185
PiperOrigin-RevId: 579904837
2023-11-06 20:26:18 +00:00
pekingme
4a2654a3f3 [TextInputLayout] Fixed unnecessary min height when losing focus with multiple lines.
Resolves https://github.com/material-components/material-components-android/issues/3451

PiperOrigin-RevId: 579017528
2023-11-06 14:00:10 +00:00
conradchen
a8307ef792 [Process] Update translated strings
PiperOrigin-RevId: 576679982
2023-10-26 20:38:39 +00:00
pubiqq
2590c42764 [TextInputLayout] Fix editText paddings on pre-Lollipop
Resolves https://github.com/material-components/material-components-android/pull/3583
Resolves https://github.com/material-components/material-components-android/issues/3582

GIT_ORIGIN_REV_ID=356f7488505470656d26b0452dae78ae01475022
PiperOrigin-RevId: 574833205
2023-10-19 11:34:21 -07:00
pekingme
bfee8a74d7 [Tokens] Upgraded to v0.175.
PiperOrigin-RevId: 572648883
2023-10-12 11:04:28 -07:00
Material Design Team
93360a5a5d [TextInputLayout] Fix onMeasure() infinite loop bug caused by posting requestLayout() before endLayout is fully rendered.
Brief explanation: in TextInputLayout#onMeasure, TextInputLayout will try to send a post to trigger requestLayout() method based on the boolean value returned from updateDummyDrawbles() method, but in shouldUpdateEndDummyDrawable(), we try to get the endLayout.getMeasureWidth() which is not reliable, if the endLayout hasn't rendered fully, the getMeasureWidth() will return 0 making the updateDummyDrawables() to return TRUE to trigger requestLayout() in an infinite loop.

To fix this issue, we need to introduce ViewTreeObserver to help us to run posing the requstLayout() after endLayout/startLayout is fully rendered.

PiperOrigin-RevId: 571765829
2023-10-10 10:21:12 -07:00
leticiars
9a4888f958 [TextInputLayout] Mutate cursor drawable before tinting it.
Resolves https://github.com/material-components/material-components-android/issues/3491

PiperOrigin-RevId: 561722342
2023-08-31 15:11:02 -04:00
pekingme
8204856dd4 [Token][Color] Upgraded to v0.170 for tonal surface colors.
PiperOrigin-RevId: 555230534
2023-08-09 19:03:25 +00:00