What does the method adapter.notifyDataSetInvalidated() accomplish? There is no documentation on it.
I am trying to reload a ListView and notifyDataSetChanged or notifyDataSetInvalidated don't seem to accomplish anything.
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 :)