问题
I made a video to show that when scrolling till the end the keyboard hides the text at the bottom:
https://photos.app.goo.gl/XZRDphEmAh5aR9D78
if you want to check out the app and the GitHub project and play around with the app and code for yourself you will find that here: supernote.org
I already tried various stuff in the manifest like:
android:windowSoftInputMode="adjustResize"
So this is the xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
tools:activity=".EditNoteActivity"
android:weightSum="100"
android:id="@+id/linearLayoutEditNoteActivity"
>
<EditText
android:id="@+id/edit_text_title"
android:textSize="25sp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="text"
tools:ignore="Autofill,LabelFor"
android:layout_weight="90"
android:gravity="top"
/>
<EditText
android:gravity="top"
android:layout_weight="10"
android:id="@+id/edit_text_description"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textMultiLine"
tools:ignore="Autofill,LabelFor"
android:background="@null"
/>
</LinearLayout>
回答1:
Add this to your activity tag in your manifest file:
android:windowSoftInputMode="adjustResize"
OR
android:windowSoftInputMode="adjustPan"
for example:
<activity android:name=".MainActivity" android:windowSoftInputMode="adjustResize" android:screenOrientation="portrait" >
</activity>
Read this question here and my answer to that question, He had a similar issue.
Update:
Try ConstraintLayout Instead of LinearLayout..
来源:https://stackoverflow.com/questions/58918517/edittexts-built-in-scroll-does-not-scroll-till-the-end-when-keyboard-is-showing