CursorAdapter的VS ArrayAdapter的一个ListView [英] CursorAdapter vs ArrayAdapter for a ListView

查看:213
本文介绍了CursorAdapter的VS ArrayAdapter的一个ListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要填补我的的ListView 数据,那将来自网络的JSON形式。这份名单应该是理论上无限的,与应用程序使更多的数据的请求,如果滚动至底部。

I want to fill my ListView with data that's going to come from the web in the form of JSON. The list should be theoretically infinite, with the app making requests for more data if scrolled to the bottom.

  • 我应该使用光标阵列(列表)适配器与我的<$链接到我的在线数据库C $ C>的ListView ?
  • 在更普遍的,有什么之间进行选择时需要考虑的参数光标阵列
  • Should I use a Cursor or an Array(List) adapter to link my online database with my ListView?
  • More generally, what are the arguments to consider when choosing between cursor and array?

推荐答案

嗯,我觉得你应该看看 ContentProviders 。他们更自然地,你正在试图解决的问题。你必须要实现自定义的光标其中的ContentProvider 上一个查询请求返回。

Well I think you should look at ContentProviders. They are more natural to the problem that you are trying to solve. You have to implement your custom Cursor which ContentProvider returns on a query request.

编号:

<一个href="http://developer.android.com/guide/topics/providers/content-providers.html">http://developer.android.com/guide/topics/providers/content-providers.html

这篇关于CursorAdapter的VS ArrayAdapter的一个ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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