I have a SherlockListFragment that implements a custom AsyncTaskLoader.
In the overridden onStartLoading(), I have:
@Override
protected void onStartLoading() {
if (mData != null) {
deliverResult(mData);
}
else{
forceLoad();
}
}
The containing SherlockListFragment initiates the loader in onActivityCreated:
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mAdapter = new MyListAdapter(getActivity());
setListAdapter(mAdapter);
getLoaderManager().initLoader(0, null, this);
}
and :
@Override
public Loader<List<MyData>> onCreateLoader(int id, Bundle args) {
return new MyListLoader(getActivity());
}
The problem is that after 5 activations/navigations to my FragmentActivity, loadinBackground() is not called. The onStartLoding is called, as well as the forceLoad, but that's it.
No Exception, nothing in the LogCat.
Any ideas?