I need to loop the image load Google map marker with images. So, I am using custom marker( there will more than 50 different marker images). I am using Universal Image loader for loading the image on Image view. Once the image is loaded on the Image view I am converting that view into marker.
My problem is ImageLoadingListener is not getting looped. But if I am placing the breakpoint then It is working fine.
final View marker = ((LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.custom_marker_layout, null);
final RoundedImageView imv_Logo = (RoundedImageView) marker.findViewById(R.id.imv_size);
bitmapArray.clear();
for (int i = 0; i < list_image_url.size(); i++) {
imageLoader.displayImage(list_image_url.get(i), imv_Logo, options,
new ImageLoadingListener() {
@Override
public void onLoadingStarted(String arg0, View arg1) {
}
@Override
public void onLoadingFailed(String arg0, View arg1,
FailReason arg2) {
imv_Logo.setImageDrawable(getResources().getDrawable(R.drawable.image_not_found));
bitmapArray.add(createDrawableFromView(Establishment.this, marker));
if (bitmapArray.size() == list_image_url.size()) {
loadmarker(progressDialog);
}
}
@Override
public void onLoadingComplete(String arg0, View arg1,
Bitmap arg2) {
bitmapArray.add(createDrawableFromView(Establishment.this, marker));
if (bitmapArray.size() == list_image_url.size()) {
loadmarker(progressDialog);
}
}
@Override
public void onLoadingCancelled(String arg0, View arg1) {
}
});
}
Could any one help me on this?