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.