CursorAdapter的VS ArrayAdapter的一个ListView [英] CursorAdapter vs ArrayAdapter for a 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 anArray(List)
adapter to link my online database with myListView
? - 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屋!