I am trying to implement a loader example on Android but can\'t get it to start the loader. I am using the following code. It will hit the \"Create Loader\" but it will never re
Since none of the answers here (besides the accepted one) alone helped me to solve this, here is how it worked for me.
I don't think the accepted answer is the correct solution, since it causes loadInBackground()
to be called more often than necessary, i.e. on orientation change, which does not happen when properly overriding the following methods in the loader as well:
@Override
public void deliverResult(final List data) {
participants = data;
if (isStarted()) {
super.deliverResult(data);
}
}
@Override
protected void onStartLoading() {
if (takeContentChanged() || participants == null) {
forceLoad();
}
}