android - 当键盘打开时 ListView 高度变化

标签 android

我正在使用 ListView 来实现带有数组过滤器的搜索。但是当我的键盘打开时, ListView 的高度设置为屏幕的剩余高度并且滚动不起作用。一旦我关闭键盘,高度保持不变(小)但滚动工作为什么? enter image description here

enter image description here

enter image description here

最佳答案

确保ListView的高度为match_parent:

<ListView
         android:layout_width="match_parent"
         android:layout_height="match_parent" />

关于android - 当键盘打开时 ListView 高度变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22591909/

相关文章:

android - 解析 SharedPreferences 字符串

android - 具有同一 Activity 的三个选项的 ListView

java - Android pdf writer APW高分辨率图像导致内存不足异常

java - 找不到jdk

android - 如何根据口味更改 Flutter 应用名称?

android - 将特定文件复制到 Android 中的模拟器

android - 启动 fragment Activity

android - Firefox for Android 内容提供商?

android - SearchView 建议不适用于一个字符

xml - 编辑 Android XML 文件时如何避免 XServer 上的 Eclipse 泄漏?