I have a multi-line editText inside a scrollView follow by a button.
If using adjustPan, the softkeyboard cover up the whole editText, leaving only the first line.
When using adjustResize, even the button shows up which is worst
Here is my xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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">
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/btn_save">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="600dp"
android:background="@color/LightBlue"/>
<androidx.appcompat.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter text"
android:inputType="textMultiLine"
android:singleLine="false"
android:gravity="top"
android:minLines="8" />
</LinearLayout>
</ScrollView>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_save"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Save"
android:clickable="false"
app:backgroundTint="@color/gray_jll"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
What I want (temporarily achived using gravity bottom, but of course we want the text to display on the top using gravity top)
I looked at Android soft keyboard covers EditText field.
But I am not using full screen mode.
android:isScrollContainer="true"
does nothing.
Please tell me what is causing this. Thanks in advance.