У меня есть фрагмент с 2 TextInputEditText. Когда моя деятельность начинается, программная клавиатура закрывает часть моего ввода, и при нажатии кнопки NEXT на клавиатуре фокус переходит ко второму входу, который полностью покрыт клавиатурой. То, что было напечатано, можно увидеть только при закрытии клавиатуры.
Это мой макет:
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/back_gradient"
android:orientation="vertical"
android:padding="@dimen/DP10"
tools:context=".activities.MainActivity">
<TextView
android:id="@+id/tv_new_course_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/SP22"
android:layout_marginBottom="150dp"
android:text="@string/newCourse"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/SP26"
android:textStyle="bold"/>
<com.google.android.material.textfield.TextInputLayout
style="@style/LoginTextInputLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/DP20"
android:layout_marginRight="@dimen/DP20"
android:hint="@string/courseName">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_new_course_name"
style="@style/LoginTextInputEditStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:nextFocusDown="@+id/et_new_course_acronym"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/LoginTextInputLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/DP20"
android:layout_marginRight="@dimen/DP20"
android:hint="@string/acronym">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_new_course_acronym"
style="@style/LoginTextInputEditStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_save_course"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/DP40"
android:layout_marginBottom="@dimen/DP10"
android:text="@string/save"
android:textColor="@color/color_ok"
app:cornerRadius="@dimen/DP15"
app:strokeColor="@color/color_ok"
app:strokeWidth="@dimen/DP2" />
Тот же макет отлично работает, если он накачан на активность, но здесь это фрагмент.