I am displaying images in gridView
, using this code:-
Picasso.get().load(wallpaperInfo.getThumbPicUrl()).fit().into(imgView);
which works perfectly fine. I have onItemClickListener()
on my gridView, which takes me to another activity, where I am displaying Image and loading it from URL again.
Picasso.get().load(wallpaper.getPicUrl()).into(new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmapS, Picasso.LoadedFrom from) {
bitmap = bitmapS;
imageView.setImageBitmap(bitmap);
onLoadImageData();
progressBar.setVisibility(View.GONE);
}
@Override
public void onBitmapFailed(Exception e, Drawable errorDrawable) {
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable) {
progressBar.setVisibility(View.VISIBLE);
}
});
Now problem is some images get load and some not. (I think big images are not loding) but after I click back and press on my gridView Item again, Image Loads! Where I am going wrong or What I dont know??
My Picasso Logs:-
D/Picasso: Hunter decoded [R7]+1557ms
04-04 00:37:12.922 14080-14461/we_pirate.one.com.opw D/Picasso: Dispatcher batched [R7]+1562ms for completion
04-04 00:37:12.950 14080-14080/we_pirate.one.com.opw D/Picasso: Main canceled [R7]+1590ms target got garbage collected
04-04 00:37:13.132 14080-14461/we_pirate.one.com.opw D/Picasso: Dispatcher delivered [R7]+1769ms
04-04 00:37:13.134 14080-14080/we_pirate.one.com.opw D/Picasso: Main completed [R7]+1769ms from DISK
Please check the version that you are using first, after this remove the .fit()
Like here