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

后端 未结 19 1620
无人共我
无人共我 2020-12-07 16:19

I\'m having trouble following a guide on using SQLite in Android. I\'m using a ListFragment instead of a ListActivity(as in the example), so I have

19条回答
  •  轮回少年
    2020-12-07 17:06

    In my case I had to have my Activity extend ActionBarActivity from the android.support.v7.app package. I was then able to use

    getSupportLoaderManager().initLoader(0, null, this);

提交回复
热议问题