列表视图项不向上滚动时键盘apprear
我有一个包含20行的ListView,列表视图项不向上滚动时键盘apprear
item--1
item--2
.
.
item--19
item--20
这是滚动
列表最后的项目
项 - 17点击 keyboad显示其覆盖editexs 现在item--15
显示
item--15
EDITTEXT
KEYBOARB
此滚动高达项 - 15 我应用软输入调整平移
那么现在 显示item--17
布局上移
item--16
item--17
KEYBOARD
现在滚动高达项 - 17 但我的问题是
item - 17我有下一个项目后-17和项目-19和项目-20
当键盘出现项目-17时,它只显示卷轴。
未显示下一项。 如何滚动最后的项目。
activity_main.xml中
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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">
<ListView
android:id="@+id/list_item"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ListView>
</LinearLayout>
您清单活动标记把android:windowSoftInputMode="adjustPan|adjustResize"
财产见下面的例子
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|adjustResize">
不工作@Bhupat –
使用android:windowSoftInputMode="adjustPan"
在AndroidMainfest.xml
或类文件中添加此getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
你CAE使用RecycleView而不是列表视图
请解释... –
后的XML代码... –
采用Android:windowSoftInputMode = “stateHidden | adjustResize” –
哇工作,但EditText上光标焦点失去...如何集中维护的EditText –