在列表视图Android的动态加载 [英] Dynamic Loading in Listview Android

查看:201
本文介绍了在列表视图Android的动态加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的数据库包含服务器镜像的1000年代,我在Android的可显示的ListView这些图像。
我要开发类似的表像,在Flipcart应用程序(如用户滚动然后下载图像)并存储从SQLite数据库SQLite中的本地副本和显示。

My DataBase contains 1000's of images on server , I have to display these images in ListView in Android. I have to develop similar List like that in the Flipcart app(If User Scroll then download Images) and store a local copy in SQlite and display from that SQlite database.

(将来如果连接不会有那么我也将能够运行我的应用程序)
因为图片将在sqlite的。

(In future if connectivity would not be there then also I would be able to run my app) because Images will be available in SQlite.

请建议为妥善解决。
loaderManager什么的其他用途请建议

Please suggest proper Solution for that. Use of loaderManager or something else please suggest

推荐答案

我不计入存储在SQLite数据库图像本身提出建议。该数据库会越来越慢,使用更繁琐。另外,我觉得你不应该自己完成这样复杂的功能还有很多准备使用开源解决方案。

I don't advise towards storing the images themselves in the SQLite database. The database will become slower to use and more cumbersome. Also, I think you should not implement such complex functionality yourself as there are many ready to use open source solutions.

有很多的解决方案,让您的文件存储缓存图像。他们透明地工作 - 当你请求的URL,他们首先检查本地缓存且仅当此检查不存在,他们将进行网络通话。他们中的大多数,直到网络调用成功,也将显示默认的缩略图。基本上,我觉得这是你能做的最好的。

There are a lot of solutions that allow you to cache the images on the file storage. They work transparently - when you request url they first check the local cache and only if this check does not exist they will make network call. Most of them also will display default thumbnail until the network call succeeds. Basically I think this is the best you can do.

我,我自己已经使用通用图像装载机的为我介绍,但出的<一个href=\"http://stackoverflow.com/questions/541966/how-do-i-do-a-lazy-load-of-images-in-listview?rq=1\">this线程你可以找到许多替代方案。

I, myself have used Universal Image loader for what I describe, but out of this thread you can find many alternatives.

这篇关于在列表视图Android的动态加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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