I have a fragment with 2 TextInputEditText. When my activity starts, the soft keyboard covers part of my input, and when clicking NEXT on the keyboard the focus passes to the second input that is completely covered by the keyboard. It´s possible to see what has been typed only when I close the keyboard.
This is my layout:
<?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" />
The same layout works fine if inflated on an activity, but here it´s a fragment.