Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preloading some images for listview with UniversalImageLoader

I am using Sergey Tarasevich's library Universal Image Loader in my Android project to load images into a ListView. At the moment I am loading my pictures in the getView() method in my adapter and everything works as expected.

The problem is I want to load some images (three or four) in advance so that the user doesn't need to wait for the images to load when scrolling. What would be the best approach to achieve this using Universal Image Loader?

like image 724
Qw4z1 Avatar asked Dec 21 '22 11:12

Qw4z1


1 Answers

You can use loadImage(...) for following images in getView(...) to pre-cache them.

like image 113
nostra13 Avatar answered Mar 03 '23 17:03

nostra13