延迟加载从SQLite的 [英] Lazy loading from SQLite

查看:141
本文介绍了延迟加载从SQLite的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在数据库中的一些4500项。这是将它们显示在一个ListView的最佳方式。我应该载入他们都在同一个拉伸时,应用程序初始化或者我应该使用延迟加载?这份名单也将搜索和过滤的。你也可以点我一些很好的文章,就会给我一个更好的主意。请你给我的建议。

I have some 4500 entries in my database. What is the best way to show them in a ListView. Should I load them all in one stretch when the application initializes or should I use lazy loading? The list will also be searchable and filterable. Could you also point me to some nice articles that would gimme a better idea. Please do give me suggestions.

推荐答案

我想点你先在这里但我也有一些经验,我想与大家分享。

I would like to point you to here first but I also have some experience I would like to share.

首先,显示出任何超过500说列表中的项目很可能会导致用户抱怨(也许不是虽然)。用户可以得到不堪重负的信息,这很烦人,为用户滚动查看所有数据(即使有过滤器,因为一些用户会拒绝使用他们,如果他们的可以的滚动)。

First, showing anything more than say 500 items in a list is probably going to cause users to complain (maybe not though). Users can get overwhelmed with info and it gets annoying for users to scroll to see all of the data (even with filters because some users will refuse to use them if they can scroll).

二,Android的数据适配器是pretty的聪明,所以几千年的项目能顺利进行处理,由于路转接器Android的高速缓存通过的结果集游标是该链接的问题的意见和迭代我指出你在我的答案的开始。

Second, the data adapter in Android is pretty smart so an adapter over thousands of items will be handled smoothly due to the way Android caches views and iterates through a result set with a cursor which is the subject of that link I pointed you to at the start of my answer.

这篇关于延迟加载从SQLite的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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