I hava a long TextInputEditText
in a TextInputLayout
in a ScrollView
, When I click at the start of the text to set the cursor position on the first line, but suddenly screen scrolls to bottom. see GIF below:
Now if I remove Material box style from TextInputLayout
, everything is ok. No sudden scroll on first line click.
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilDescription"
<!--style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"-->
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:hint="Product Description"
app:counterEnabled="true"
see this GIF, when I remove style attribute:
What's wrong with outlined Box style?
Caution: I don't want to change windowSoftInputMode
in AndroidManifest to adjustPan
, I should use adjustResize
because I have some other stuff which keyboard shouldn't appear on top of them.