material-components / material-components/material-components-android
[TextInputLayout] Visibility and drawable problems on configuration change when using two password fields
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:**
It happens when you use two password fields and the first one is hidden, and the second is not.
**Expected behavior:**
After both the first and second orientation change:
* the first field stays hidden and the drawable shows hidden state (eye)
* the second field stays visible and the drawable shows visible state(eye-crossed)
**Actual behavior:**
After the first orientation change:
* the first field stays hidden, but the **drawable shows visible state (eye-crossed)**
* the second field stays visible, and the drawable shows visible state(eye-crossed)
After the second orientation change:
* **the first field becomes visible, and the drawable shows visible state (eye-crossed)**
* the second field stays visible, and the drawable shows visible state(eye-crossed)
See video in comment.
**Minimal sample app repro:**
https://github.com/herrbert74/PasswordFields
**Android API version:** Android API 32 and 35
**Material Library version:** tested on 1.7.0 and 1.12.0, fails both
**Device:** Most if not all devices and emulators our team has
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
Run the minimal sample app repro at https://github.com/herrbert74/PasswordFields on Android API 32 or 35 and reproduce the behavior across two orientation changes. Investigate the Material Library's TextInputLayout password-field state handling; done means each field retains its hidden or visible state and matching drawable after both changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100