Open
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.
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
app:endIconMode="clear_text">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences" />
</com.google.android.material.textfield.TextInputLayout>
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".