1

FragmentPagerAdapter implementing LoaderManager.LoaderCallbacks<Cursor>

view story
linux-howto

http://stackoverflow.com – Im trying to implement a FragmentPagerAdapter with a cursor loader. However, it seems that I am unable to access the cursor within getItem() as I get a null reference error when attempting to access the cursor as it is not been set yet in onLoadFinished(). Will onLoadFinished() not complete until getItem() is finished? Is there a better way to load the cursor data? I can query the ContentProvider directly and store the results in my cursor, but thought a loader is preferred. public class MyAdapter extends FragmentPagerAdapter implements LoaderManager.LoaderCallbacks<Cursor>{ pr (HowTos)