The BitmapLazyLoader class looks like a consumer. It holds a Thread reference. This alone is very confusing, since Runnables are intended to be passed to a Thread constructor, but Runnables should not know about the thread for the sake of encapsulation. Letting this apart, this class attempts to spawn a thread only once, but as you are creating an instance of Runnable each time a row is drawn, you'll end up spawning a considerable number of threads. This will probably end in a TooManyThreadsException being thrown as in BlackBerry the max number of threads is limited to 16 per app. Even if you don reach the limit, performance will degrade as BlackBerries, which sport a single core CPU, you shouldn't have more than 2-3 threads running at the same time. EVEN if you could spawn infinite threads, in BlackBerry you can only have X connections opened at the same time (I think X is 5 for the whole OS, not sure about this). So first of all modify the code to ensure only a single worker thread is downloading images. (and if possible, extract the thread instantiation and launch out of the Runnable class).

When the bitmap is downloaded, you are not doing anything with it. Look at the ImageDownloadCompleted method, it is empty. (BTW, the convention for methods is to start with lowercase) So you should store the bitmap somewhere and call invalidate on your list, which in turn will paint the stored bitmaps.

Thanks for the answer. Can you update my code to load images in ListField please as i am new to BlackBerry
–
iDroid ExplorerDec 13 '12 at 12:07

No, the question should not be modified so that other ppl can understand the problem and the solution. I'd declare a Bitmap array of the same length as arrPictures, and in ImageDownloadCompleted method, you only store the received parameter bmp in the bitmap array in its correct position. Also modify drawListRow method to draw in each row the bitmap of that position in the array (or nothing if it is null).
–
Mister SmithDec 13 '12 at 12:18

Your explaination can help me a lot but can you give me sample on How to load images in the ListField
–
iDroid ExplorerDec 13 '12 at 12:19

Please don't stat anything in constructor. As well probably better to call list.invalidate(index) instead of whole list. As well sometimes better to download images while scrolling not on list showing
–
Eugen MartynovDec 13 '12 at 20:17