I have the following very simple dialog:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="50sp"
android:background="#FFFFFF">
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="Sign up to be a beta tester"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/email"
style="@style/Widget.AppCompat.EditText"
android:layout_width="300dp"
android:text=""
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:hint="Your e-mail"
android:inputType="textEmailAddress"
android:singleLine="true"
android:textSize="20sp"
android:windowSoftInputMode="stateVisible|adjustResize"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/btnSubmitGrid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/email">
<Button
android:id="@+id/btnSubmitEmail"
style="@style/ButtonStylePrimary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Submit"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btnCancel"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/btnCancel"
style="@style/ButtonStyleNegative"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/cancel"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/btnSubmitEmail"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
I'm showing it like this
AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.MyDialogTheme);
AlertDialog alert = builder.create();
alert.setView(view);
alert.show()
When I click on the text field, however, it opens a giant text field + keyboard, in front of the app. Instead of simply opening the keyboard for me to type.
Is there a way to make it simply open the keyboard but not the giant blank window for me to type?