I use a universal image downloader to display thumb images in a list. I implemented the basic steps in the adapter, and everything works. The problem is that if I have 10 items in the list and I can see the first 5 as soon as I scroll down the new images, but when I scroll through the backups, the images are replaced again correctly, what I want is the first 5 images that are shown at startup should not be replaced. So when I scroll back up and down, the images are not replaced again and again.
As in the example with the uil ListActivity sample, images loaded after loading are not replaced when scrolling back.
Here is the code
Application class
public class MyApplication extends Application { @Override public void onCreate() {
Adapter
public class CarListAdapter extends BaseAdapter { private ArrayList<CarDetail> items = new ArrayList<CarDetail>(); private Context context; private ImageLoader imageLoader; private ImageLoadingListener animateFirstDisplayListener; public CarListAdapter(Context context , ArrayList<CarDetail> items , ImageLoadingListener animateFirstDisplayListener) { super(); this.context = context; this.items = items; this.animateFirstDisplayListener = animateFirstDisplayListener; imageLoader = ImageLoader.getInstance(); imageLoader.init(ImageLoaderConfiguration.createDefault(context)); } @Override public int getCount() {
Ravi
source share