02-18-2012 01:17 AM
I have a listfield where i am displaying text and image.I am fetching the image from server and showing it by lazy loading.Everythng is fine bt as long as the lazy loading is going on i cant scroll into the listfield smoothly.After all d images hav been replaced i can scroll again.Plz help
02-18-2012 03:14 PM
If you are using a more recent device, or the Simulator, and you are seeing this problem, then I suspect you are downloading on the Event Thread. Start a separate Thread for blocking activity, like Networking.
If you are starting up a download Thread per image, then this might be causing you a performance problem. Start a single Thread that processes all your images.
07-28-2012 04:20 AM
You have to code this yourself.
Start a background Thread to download the images. When you have an image to download, put an entry in the queue for this Thread, and replace the image with a place holder. When your downloading Thread loads the image from the server, it can replace the placeholder with the real image.
There are management issues to contend with (like starting and stopping this Thread), but they are secondary to getting the downloading right.
You will need to be sure that the Thread runs in the background (you mist start it). When you update the image, then you will need to swap to the Event Thread
07-28-2012 05:05 AM
You need to download images in a seperate thread , actually what happens when you render a list row , it looks for bitmap image.
So What you can do once you are creating your List view. provide a default loading bitmap image , start a thread to download image ,
07-31-2012 05:26 AM
It is not really that possible to give a useful example in code here, the complete code would be quite large and confusing.
Instead can you tell us which part of this process you are having problems with and then we can help you write it.