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

后端 未结 19 1652
无人共我
无人共我 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:11

    0

    After a long sacrifice i got this solution if you are using fragments then just use this code.

    getActivity().getSupportLoaderManager().initLoader(1, null, YourActivity.this);

    i hope this is helpful for you

提交回复
热议问题