9 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
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
conradchen
d9b97b42ff [TextField] Make collapsed hint aligned with prefix and suffix text
The original logic prevents displaying the collapsed hint on top of suffix text. The behavior looks not consistent with the case of prefix text or outline variants of text fields.

This CL also fixes the issue that when drawable paddings are set on EditText, the collapsed hint is not aligned with the prefix anymore.

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

PiperOrigin-RevId: 511390069
2023-02-23 03:45:40 -08:00
rightnao
e284e57d64 [TextInputLayout] Add scale type setters/getters for start and end image buttons in the TextInputLayout
Resolves https://github.com/material-components/material-components-android/issues/2080

PiperOrigin-RevId: 463381963
2022-07-28 17:36:31 -04:00
rightnao
633b3cecfa [TextInputLayout] Adding set/get methods to control minimum width and height for start/end icons
Resolves https://github.com/material-components/material-components-android/issues/2080

PiperOrigin-RevId: 461939723
2022-07-20 21:44:40 +00:00
conradchen
2c0e42f56a [TextField] Fix icon ripples go behind the edit text
On API 21 & 22, the borderless ripple will go behind the container view under certain conditions. Setting a mask when creating the ripple drawable to restrain the ripple inside view bounds somehow solves the issue.

PiperOrigin-RevId: 445920587
2022-05-02 09:52:55 -04:00
Material Design Team
940c8aafd8 Automated g4 rollback of changelist 444595599
PiperOrigin-RevId: 445446957
2022-04-29 14:34:16 -04:00
conradchen
e3bd856567 [TextField] Fix icon ripples go behind the edit text
On API 21 & 22, the borderless ripple will go behind the container view under certain conditions. Setting a mask when creating the ripple drawable to restrain the ripple inside view bounds somehow solves the issue.

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

PiperOrigin-RevId: 444595599
2022-04-26 14:09:24 -04:00
conradchen
9a46af2af2 [CleanUp][TextField] Extract start components from TextInputLayout
PiperOrigin-RevId: 432953110
2022-03-09 21:07:45 +00:00