material-components / material-components/material-components-android
[TextInputLayout] hintEnabled set to false but hint top space is still claimed
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** Setting `app:hintEnabled="false"` properly hides the hint but keeps the top space where it would normally appear, causing misalignment of components.
**Expected behavior:**
The problem as seen in the Layout Inspector:
Marked is the mentioned claimed space.
Also from the IDE preview:
With `app:hintEnabled="false"`

Without `app:hintEnabled="false"`

The expected behavior would have been basically the second the "without" visuals but without the animation and the hint.
**Source code:**
```
```
**Android API version:** From 23 up to recent
**Material Library version:** 1.2.0-alpha5
**Device:** Emulators, Pixel 3XL, Pixel 4XL, Samsung S9, S10, others
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 at the TextInputLayout entry point and reproduce the XML case with app:hintEnabled="false" and an error. Verify the layout in the Layout Inspector and IDE preview; done means the hidden hint no longer reserves top space while the error and TextInputEditText remain correctly positioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100