Loading Multiple Images Remotely in ListView

Hi,

I want to show the product  Image & details in scroll-view.

I am getting Image Url from server API thus using a for-loop I am creating a scroll-view & using the network.download() in the system.TemporaryDirectory.

While the records are 5-10 the app is stable, but when the records come 20+, the app gets close.

Can anyone suggest a better way to do it?

I am thinking to implement the system like pagination where I will fetch on the set of records & clear previous.

Assif
 

What’s the image size ? It should be memory issue.

You can try to remove the images if they are out of the screen (you will need to use enterFrame listener and the y-position of the image to determine whether it is out of screen).

Hi yosu,
Still, it will hit remote url for the number of the record that it will get from server, even if it get ‘n’  :)  

What about loading only 10-records, than as user click more or next button will load further & removing the previous.

Assif

Why not use a tableView for this? It culls off screen rows. Also are you checking to see if you have the file cached before you try and download it again?

Rob

What’s the image size ? It should be memory issue.

You can try to remove the images if they are out of the screen (you will need to use enterFrame listener and the y-position of the image to determine whether it is out of screen).

Hi yosu,
Still, it will hit remote url for the number of the record that it will get from server, even if it get ‘n’  :)  

What about loading only 10-records, than as user click more or next button will load further & removing the previous.

Assif

Why not use a tableView for this? It culls off screen rows. Also are you checking to see if you have the file cached before you try and download it again?

Rob