material-components / material-components/material-components-android
[TextInputLayout] Set hint style for both floated and default positions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I'm adding text field programmatically and then setting styles to hint with `setHintTextAppearance`, but styles are working only on floated state and I couldn't find the way to apply them to hint at normal state. While `setDefaultHintTextColor`, does work for both. Setting textSize to editText child of TextInputLayout doesn't help also.
**Describe the solution you'd like**
I would like to `setHintTextAppearance` work for both state of hint.
**Describe alternatives you've considered**
It's probably also okay, if there will be new method for this? I don't see any other solutions.
**Additional context**
I would like to help, but I'm not so experienced, so I will need a little bit guidance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TextInputLayout implementation and the code handling setHintTextAppearance for floated and default hint states. Trace how setDefaultHintTextColor applies to both states, then add equivalent behavior and verify that hint styling is consistent in each position with the relevant Android tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100