Search code examples
imageblackberryguidlistfield

Loading images to ListField in blackberry


I am loading some data from web service with image.But problem with image loading.

I have to display default image first,then the loaded image is placed on default image asynchronously.I do not have an idea how can i do this. Please help me.


Solution

  • First, use some default image from project resources, same for all rows.

    Then for each row run a thread to load image, use a callback in thread to update list field row when image is loaded. See Coderholic: Blackberry WebBitmapField

    Remember that we can use only limited number of threads in Blackberry application. So better create some thread pool with 3-5 threads running.