Skip to content

[TextField] disabling hint prevents custom defaultHintTextColor #3986

Open
@farfromrefug

Description

@farfromrefug

Description:
I want to have textfield with disabled floating hint but with custom hint color for when the textfield is empty.

Let say i have a textfield with floating hint enabled.
I use setDefaultHintTextColor to change the hint color. It works and changes the color for expanded and collapsed.

Now i call setHintEnabled(false).
The floating hint gets disabled (expanded) but i still see the hint collapsed when there is no text (which is what i want).
However i loose the custom colors i set with setDefaultHintTextColor for when there is no text

Expected behavior: Screenshots and/or description of expected behavior
The setDefaultHintTextColor to be preserved while using setHintEnabled(false)

Source code: The code snippet which is causing this issue

Minimal sample app repro: Please consider attaching a minimal sample app that reproduces the issue. This will help narrow down the conditions required for reproducing the issue, and it will speed up the bug fix process. You may attach a zip file of the sample app or link to a GitHub repo that contains the sample app.

Android API version: 13, 11, 10

Material Library version: 1.11.0
Device: Emulator/real devices

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions