如果不建议重新查询,Android现在如何编码? [英] Android how do you code now if requery is deprecated?

查看:51
本文介绍了如果不建议重新查询,Android现在如何编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据主题。如果我们曾经调用过cursor.requery(),但现在不赞成使用它,那么现在如何调用该函数呢?

as per the topic. If we used to call cursor.requery(), but it is now deprecated, how do you call this function now?

不推荐使用此方法。
不要使用它。只需请求一个新的游标,这样您就可以异步执行此操作,并在新的游标返回后更新列表视图。

"This method is deprecated. Don't use this. Just request a new cursor, so you can do this asynchronously and update your list view once the new cursor comes back."

一个请求新的游标并将其传递回适配器?

So how does one request a new cursor and pass it back to the adapter?

推荐答案

再次在执行任何DML查询时重新初始化游标,可以请参阅

again re-initialize cursor when your any DML query execute, can refer this

这篇关于如果不建议重新查询,Android现在如何编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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