Android startmanagingcursor()仍然需要吗?

Android startmanagingcursor()仍然需要吗?,android,android-cursorloader,Android,Android Cursorloader,我正在我的应用程序中使用cursorLoader 我的问题是我仍然在使用StartMagingCursor(游标);方法来管理特定活动中的游标。这个功能还需要吗 由于这种方法已被弃用,我想知道确切的替代方法 每个人都说LoaderManager和Loader是我问题的解决方案 真正的问题是我已经实现了LoaderManager和Loader以及以下重写方法: @Override public void onLoaderReset(Loader<Cursor> arg0) {

我正在我的应用程序中使用cursorLoader

我的问题是我仍然在使用StartMagingCursor(游标);方法来管理特定活动中的游标。这个功能还需要吗

由于这种方法已被弃用,我想知道确切的替代方法

每个人都说LoaderManager和Loader是我问题的解决方案

真正的问题是我已经实现了LoaderManager和Loader以及以下重写方法:

    @Override
public void onLoaderReset(Loader<Cursor> arg0)
{
    adapter.swapCursor(null);
}

@Override
public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor)
{
    adapter.swapCursor(cursor); 
}
@Override
public Loader<Cursor> onCreateLoader(int arg1, Bundle instanceState)
{
    CursorLoader cursorLoader= new CursorLoader(getApplicationContext(), searchContentUri, null, selection, selecArgs, null);
    return cursorLoader;
}
@覆盖
公共void onLoaderReset(加载程序arg0)
{
适配器.swapCursor(空);
}
@凌驾
public void onLoadFinished(加载器arg0,光标)
{
适配器.swapCursor(游标);
}
@凌驾
公共加载器onCreateLoader(int arg1,Bundle instanceState)
{
CursorLoader CursorLoader=新的CursorLoader(getApplicationContext(),searchContentUri,null,selection,selection,selecArgs,null);
返回游标装入器;
}

我想知道这里调用查询的位置?

如果您使用游标加载程序、加载程序回调和getcontent提供程序来获取游标,那么,您不需要StartManager游标,因为它已经被处理。在切换到LoaderManager之后,有必要替换NotifyingAsyncQueryHandler以执行查询。很抱歉,我不确定这一点。。刚刚使用了光标加载程序、回调和内容提供商的基础知识,但英国电信从未使用过这种方法。这是我的猜测。AsyncQueryHandler使用ContentResolver挖掘数据库。但在这里LoaderManager可以直接执行。所以,当使用LoaderManager时,不需要使用AsyncQueryHander来处理查询。