Android notifyDataSetChanged

notifyDataSetChanged()用于动态的更新ListView中的数据。最后还是会调用Adapter中的getView函数。

notifyDataSetChanged()相比于setAdapter()的区别在于,对于scrap heap中存在的view,不会再去inflate。

参考链接:

https://www.pocketdigi.com/20100827/75.html

http://blog.csdn.net/chenzhiqin20/article/details/8519714

https://francisshi.github.io/2015/08/26/Android源码分析之NotifyDataSetChanged/

posted @ 2017-03-21 12:01  SuperTao1024  阅读(247)  评论(0编辑  收藏  举报