当键盘处于活动状态时停止调整 ListView 的大小。[带图像]。 Android 工作室
Stop adjusting size of ListView when keyboard is Active.[with images]. Android studio
View without keyboard
View with keyboard. The keyboard is on the background of the search view. It irritates user.
不想每次打开键盘都出现listview。
正如您从第二张图片中看到的那样,搜索视图下的列表视图对用户来说很烦人。
当键盘未激活时,一切正常。
我试过了android:windowSoftInputMode="stateVisible"
android:windowSoftInputMode="adjustResize"
adjustPan
和 adjustNothing
没有任何效果。
问题出在 ConstraintLayout
。
我把我的观点切换到RelativeLayout
!
然后,我把每个元素都放在 regarding.
现在,没有约束布局中的重叠。
解释:
ConstraintLayout
通过填充设置元素。
RelativeLayout
相对于彼此设置元素。
View without keyboard
View with keyboard. The keyboard is on the background of the search view. It irritates user.
不想每次打开键盘都出现listview。 正如您从第二张图片中看到的那样,搜索视图下的列表视图对用户来说很烦人。 当键盘未激活时,一切正常。
我试过了android:windowSoftInputMode="stateVisible"
android:windowSoftInputMode="adjustResize"
adjustPan
和 adjustNothing
没有任何效果。
问题出在 ConstraintLayout
。
我把我的观点切换到RelativeLayout
!
然后,我把每个元素都放在 regarding.
现在,没有约束布局中的重叠。
解释:
ConstraintLayout
通过填充设置元素。
RelativeLayout
相对于彼此设置元素。