Lokesh Tiwari
Lokesh Tiwari

Reputation: 10586

Dynamic Loading in Listview Android

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.

(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.

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

Upvotes: 0

Views: 1032

Answers (1)

Boris Strandjev
Boris Strandjev

Reputation: 46943

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.

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.

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

Upvotes: 1

Related Questions