Android的ListView的适配器notifyDataSetInvalidated()与notifyDataSetChanged() [英] Android ListView Adapter notifyDataSetInvalidated() vs notifyDataSetChanged()

查看:589
本文介绍了Android的ListView的适配器notifyDataSetInvalidated()与notifyDataSetChanged()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么区别? Android的文件不具有notifyDataSetInvalidated()的说明。我想也许你调用该函数通知所有已注册侦听器,但使用notifyDataSetChanged()不通知他们?

What is the difference? The android documentation doesn't have a description for notifyDataSetInvalidated(). I was thinking maybe you call that function to notify all registered listeners, but use notifyDataSetChanged() to not notify them?

推荐答案

变更是指更改的数据集。个别项目更新或项目被添加或删除。无效装置的数据源不再可用。

Changed means the data set changed. Individual items updated, or items were added or removed. Invalidated means the data source is no longer available.

这篇关于Android的ListView的适配器notifyDataSetInvalidated()与notifyDataSetChanged()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆