I have read that Loader
s monitor the underlying data-source for changes, and load new data whenever it becomes available.
My question is that when would the data in the data source change? Any examples will be appreciated.
Loader
) ?My question is that when would the data in the data source change?
That would depend on the data source. In the classic case of CursorLoader
, the data would change if the contents of the ContentProvider
change, by something calling methods like insert()
on a ContentResolver
.
in what cases could this data in the returned array change
If something modifies the data in the data source such that the search results change, such as by deleting items that had formerly been returned in the search.