I want to get the initialized CursorLoader instance from LoaderManager like this:
CursorLoader loader = (CursorLoader) getLoaderManager().getLoader(0);
But the compiler gives me this error:
Cannot cast from Loader<Object> to CursorLoader
I could hold the CursorLoader instance when it is created, but I’d rather let LoaderManager maintain it. So any idea to fix this?
I am using compatibility-library-v4.
It needs to be converted twice: