Look at the source code for these two methods
public void notifydatasetchanged ()
The method internally implements the invocation of the OnChanged event on top of each observer. This method is called whenever a change in the data set is found, or when a new state of the data is read.
public void notifydatasetinvalidated ()
The method internally implements the invocation of the Oninvalidated event on top of each observer. This method is called whenever a data set monitoring change is found.
It's plain to understand, literally, that
1: If the data source to be refreshed is changed, call notifydatasetchanged () For example: We are in Sina Weibo, to display the micro-blog to refresh;
2: If the data source fails, call notifydatasetinvalidated ()
Does it feel a lot easier to understand this? Oh
What is the difference between notifydatasetinvalidated () and notifydatasetchanged () in Android?