As far as I know, the notifyDataSetInvalidated()
method stops the adapter from accessing the data (in case it's invalid, unavailable, etc.). The notifyDataSetChanged()
method updates the ListView
so you can see the new data added, but you have to call it in the UI thread.
It helped me a lot to watch this video -- there are two sections where they mention those methods and explain how to use them correctly. Maybe it helps you too :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…