notifyDataSetChange()如何在android中运行? [英] How notifyDataSetChange() works in android?
本文介绍了notifyDataSetChange()如何在android中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
考虑以下代码。
while(..)
{
arrList.add(item);
}
arrAdapter.notifyDataSetChanged();
它会将所有项目添加到ListView吗?
或
在将每个项目添加到List时应该调用它吗?
Consider the following code.
while(..)
{
arrList.add(item);
}
arrAdapter.notifyDataSetChanged();
Will it add all the item to ListView??
or
Should Call it in while itself while adding each item to List??
推荐答案
有一个非常好的解释=> ; Android。 notifyDataSetChanged()方法和ListViews如何工作? [ ^ ]
There is a very good explanation => Android. How does notifyDataSetChanged() method and ListViews work?[^]
这篇关于notifyDataSetChange()如何在android中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文