Android ListView Adapter notifyDataSetInvalidated() vs notifyDataSetChanged()

ぐ巨炮叔叔 提交于 2019-11-28 19:26:25

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/6380051/android-listview-adapter-notifydatasetinvalidated-vs-notifydatasetchanged

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!