Java 软键盘与多行文字重叠
我在Java 软键盘与多行文字重叠,java,android,android-edittext,android-softkeyboard,Java,Android,Android Edittext,Android Softkeyboard,我在ScrollView中有多行EditText。当显示键盘时,我需要使整个EditText可见。现在它与EditText的底部重叠,只显示第一行。 我已经在这里阅读了很多问题,尝试了adjustPan/adjustResize组合等,但没有任何真正的帮助。在AndroidManifest.xml中: <activity android:configChanges="orientation|keyboardHidden|screenSize" android:windowS
ScrollView
中有多行EditText
。当显示键盘时,我需要使整个EditText
可见。现在它与EditText的底部重叠,只显示第一行。
我已经在这里阅读了很多问题,尝试了
adjustPan
/adjustResize
组合等,但没有任何真正的帮助。在AndroidManifest.xml中:
<activity
android:configChanges="orientation|keyboardHidden|screenSize"
android:windowSoftInputMode="adjustResize"
...
在AndroidManifest.xml
中:
<activity
android:configChanges="orientation|keyboardHidden|screenSize"
android:windowSoftInputMode="adjustResize"
...
对编辑文本使用以下xml代码:
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="10dp"/>
对编辑文本使用以下xml代码:
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="10dp"/>
将所有视图放在顶层滚动视图中,以便在屏幕没有您想象的那么高时可以滚动内容。出于总体布局的目的,假设屏幕的高度不是一个好主意。如果希望内容在所有屏幕大小、方向和键盘状态下都可以滚动,请始终使用滚动视图。将所有视图放置在顶层滚动视图中,以便在屏幕没有您想象的那么高时可以滚动内容。出于总体布局的目的,假设屏幕的高度不是一个好主意。如果希望内容在所有屏幕大小、方向和键盘状态下都可以滚动,请始终使用滚动视图。
<EditText
android:id="@+id/et_feedback"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:lines="8"
android:maxLines="10"
android:minLines="6"
android:padding="10dp"
android:gravity="top|left"
android:inputType="textMultiLine"
android:background="@drawable/et_bg"
android:scrollbars="vertical" />
添加有问题的布局。添加有问题的布局。