CursorLoader与startManagingCursor() [英] CursorLoader with startManagingCursor()

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

问题描述

我在我的应用程序使用CursorLoader,做数据库交易。

I use CursorLoader in my App, to do DB transactions.

我的应用程序也有方法调用startManagingCursor(),这是德precated。

My app also has the method calling startManagingCursor(), which is deprecated.

我只是想取代这个方法调用,那我该怎么办?

I just want to replace this method calling, so what am I supposed to do ?

推荐答案

startManagingCursor()是pcated德$ P $,因为它确实在主线程操作,可以冻结了用户界面,并提供较差的用户体验。您应该使用 CusrorLoader 用的 LoaderManager 代替。请查看从的 =htt​​ps://开头加.google.com / 100751609891157863386> 亚历克斯·洛克伍德 的详细说明:

startManagingCursor() is deprecated because it does operations on the main thread which can freeze up the UI and deliver a poor user experience. You should use a CusrorLoader with a LoaderManager instead. Check out this tutorial series from Alex Lockwood for detailed instructions:.

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

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