startManagingCursor(cursor)已过时的方法 [英] startManagingCursor(cursor) deprecated method

查看:241
本文介绍了startManagingCursor(cursor)已过时的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了以下代码:

Cursor c = cr.query(message, null, null, null, null);
startManagingCursor(c);

但是 startManagingCursor(c)已过时方法。我如何替换它?

But startManagingCursor(c) is a deprecated method. How can i replace it?

推荐答案

此方法在API级别11中已弃用。请使用新的 CursorLoader 类和 LoaderManager 代替;

This method was deprecated in API level 11. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package.

查看本教程系列

这篇关于startManagingCursor(cursor)已过时的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆