android - Android ListView 如何刷新?

标签 android android-listview refresh

添加/删除动态数据后如何刷新 Android ListView

最佳答案

调用notifyDataSetChanged()一旦您修改了适配器中的数据,就可以在您的 Adapter 对象上执行此操作。

有关如何/何时调用 notifyDataSetChanged() 的一些其他细节可以在 this Google I/O video 中查看。 .

关于android - Android ListView 如何刷新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58143485/

相关文章:

android - Phonegap 在本地构建发布版本(没有 Phonegap Build)

android - 布局预览器中未呈现 "Material Design Components"

java - Recyclerview 重复 Json

php - 当有可用更新图像时,如何防止旧图像出现在页面重新加载上

java - Android Java 复习没有点击

android - 找不到 Gradle DSL 方法 : 'compile() The project ' android' may be using a version of Gradle that does not contain the method

android - 涟漪效应有时不出现

Android: ListView 滚动条

Android - 为 ListView 中的单个项目设置动画

jquery 移动更新 anchor 文本