当键盘处于活动状态时,停止调整ListView的大小。[带有图像]。 Android Studio

问题描述 投票:0回答:1

View without keyboard

View with keyboard. The keyboard is on the background of the search view. It irritates user.

我不想每次打开键盘时都显示listview。从第二张图片中可以看到,搜索视图下的listview对用户来说很烦人。当键盘未激活时,一切正常。

我尝试过android:windowSoftInputMode="stateVisible"android:windowSoftInputMode="adjustResize"adjustPanadjustNothing无效。

java android-studio android-layout android-listview android-softkeyboard
1个回答
0
投票

问题出在ConstraintLayout中。我将视图切换为RelativeLayout!然后,我将每个元素都放在。

现在,不像约束布局中那样没有重叠。

说明:ConstraintLayout通过填充设置元素。RelativeLayout相对于彼此设置元素。

© www.soinside.com 2019 - 2024. All rights reserved.