带有startManagingCursor()的CursorLoader

Ash*_*jan 5 android android-cursorloader

我在我的App中使用CursorLoader进行数据库事务.

我的应用程序也有调用startManagingCursor()的方法,该方法已被弃用.

我只是想替换这个方法调用,所以我该怎么做?

Anu*_*kur 11

startManagingCursor()不推荐使用,因为它在主线程上执行操作,这可能会冻结UI并提供糟糕的用户体验.您应该使用带有LoaderManagerCusrorLoader.看看本系列教程从详细说明:.Alex Lockwood