getLoaderManager().initLoader() doesn’t accept ‘this’ as argument though the class (ListFragment) implements LoaderManager.LoaderCallbacks

You are not using the right implementations of CursorLoader and Loader.
Remove your old imports and use these ones:

import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v4.widget.CursorAdapter;

But I have the same Problem using SherlockActionBar:
As I have to extend SherlockListActivity there is NO method getSupportLoadManager().

Any ideas on this?

EDIT: follow this tutorial if you do not know how to use fragments. Create a new Class with extends SherlockFragment and move your display logic there. Make your old activity extend SherlockFragmentActivity and show the newly created SherlockFragment. This way I got it working. Thanks to @JakeWharton!

Leave a Comment