I'm getting "The method getSupportLoaderManager() is undefined for the type Activity" when using getSupportLoaderManager() inside a List Fragment. Do you have any ideas on how to fix this?
Thanks!
The ListActivity is defined as :
public class SelfieListActivity extends FragmentActivity implements SelfieListFragment.Callbacks{...}
And the ListFragment is defined as :
public class SelfieListFragment extends ListFragment implements LoaderCallbacks<Cursor>{...}
The line is inside the ListFragment and it's defined as :
getActivity().getSupportLoaderManager().initLoader(_ID, null, this);
Thanks in advance!. Please let me know if you need more details.
You may be inheriting from
android.app.ListFragment
instead ofandroid.support.v4.app.ListFragment
.