material-components / material-components/material-components-android
[TextInputLayout] Collapses on small device when showing keyboard.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** TextInputLayout collapses when expanding the keyboard on a smaller device, when that field is inside a dialog.
**Expected behavior:** Should not collapse.
**Source code:** The code snippet which is causing this issue. Please consider attaching a minimal sample app that reproduces the issue.
```
```
```
Objects.requireNonNull(dialog.getWindow()).setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
```
It seems related to the setSoftInputMode() call, which I'm using to show the keyboard.
**Android API version:** 23, 29
**Material Library version:** Reproduced on 1.1.0, 1.2.0-rc-1 and 1.3.0-alpha-1
**Device:** Nexus 5 emulator running API 23 and API 29
Happens both with and without android:windowSoftInputMode="adjustPan".
https://trello-attachments.s3.amazonaws.com/53ade59a2a84a43be5b64df0/5f0c75af8a5d2d8f5fed8dc9/b327a9e68beebdd9bdad27025eb361cc/rename_bug.mp4
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 with the supplied TextInputLayout XML and the dialog window's setSoftInputMode call, then reproduce the collapse on the Nexus 5 emulator with Android API 23 and 29. Done means the TextInputLayout remains expanded when the keyboard is shown, including with and without adjustPan.
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
- Needs clarification
- Newbie friendliness
- 25/100