我想CursorLoader从LoaderManager这样得到初始化的实例:
CursorLoader loader = (CursorLoader) getLoaderManager().getLoader(0);
Run Code Online (Sandbox Code Playgroud)
但是编译器给了我这个错误:
Cannot cast from Loader<Object> to CursorLoader
Run Code Online (Sandbox Code Playgroud)
我可以在CursorLoader创建实例时保留它,但我宁愿让它LoaderManager保持它.所以有什么想法解决这个问题?
我正在使用兼容性库-v4.
android ×1