gpt4 book ai didi

android - CursorLoader 与 startManagingCursor()

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:49:56 25 4
gpt4 key购买 nike

我在我的应用程序中使用 CursorLoader 来执行数据库事务。

我的应用程序还有调用 startManagingCursor() 的方法,该方法已弃用。

我只想替换这个方法调用,那我该怎么办呢?

最佳答案

startManagingCursor() 已弃用,因为它在主线程上执行操作,这会卡住 UI 并提供糟糕的用户体验。你应该使用 CusrorLoaderLoaderManager反而。查看this tutorial series来自 Alex Lockwood详细说明:.

关于android - CursorLoader 与 startManagingCursor(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19651680/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com