java - Android ListView 未在滚动时重新绘制

标签 java android list listview view

最好用图片来描述。在我的 ListView 中滚动之前,一切看起来都很好:

enter image description here

滚动后:

enter image description here

什么可能导致这种奇怪的行为?我正在运行 Android 4.2.2Google Nexus 上对其进行测试,并在运行 Android 3.2 的模拟器上进行了测试,结果相同。在此示例中,我使用具有两种行类型的 ListView,但使用仅具有一种行类型的标准 ListView 得到相同的结果。

最佳答案

事实证明,问题是我没有在布局 XML 文件中设置背景颜色...如果有人可以向我解释为什么这可以解决问题,我将不胜感激。添加 不过,我的主布局的 android:background="#000000"修复了它。

...

关于java - Android ListView 未在滚动时重新绘制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17739936/

相关文章:

java - 如何在 Android KitKat (4.4) 中发送彩信?

单击window10上的android studio图标时Android studio未打开

C# : Removing an item from a List<T> without knowing its index?

分解元组列表的 pythonic 方法

java.lang.ClassNotFoundException : org. apache.struts.taglib.bean.CookieTei

java - 了解冒泡/插入排序

java - JAX-RPC 1.1 中的公共(public)默认构造函数错误

java - android Java哈希表无法存储某些字符

android - 找不到类 : Empty test suite when running unit tests in Android Studio

python - 如何将多个列表划分在一起同时保持顺序?