I have a custom Gridview. In my adapter asynchronous image downloading done using AQuery. images are downloaded properly but in some cases error will occur so that time imageView background goes totaly white.i want to set that error image.
Now here is the code of my adapter in gridView():
try{
String[] tmp_arr_thumb_img = prodItems.get(holder.position).getprod_image().split(global.split_seprator);
//String imageID = tmp_arr_thumb_img[0];
String thumbImg = tmp_arr_thumb_img[1];
if (aQuery.shouldDelay(holder.position, convertView, parent, global.GLOBAL_UPLOADED_PHOTOS_URL + thumbImg)){
aQuery.id(holder.imageView).image(R.drawable.no_image);
}else{
aQuery.id(holder.imageView)
.image(global.GLOBAL_UPLOADED_PHOTOS_URL + thumbImg,true,true,200,0, new BitmapAjaxCallback(){
@Override
protected void callback(String url, ImageView iv, Bitmap bm, AjaxStatus status) {
iv.setImageBitmap(bm);
}
}.animation(AQuery.FADE_IN));
}
}catch (OutOfMemoryError err){
err.printStackTrace();
}