Android - Picasso Misses Pictures Sometimes
I am using Picasso library for images downloading using the following code, I've to load many pictures in a loop by resizing them and transforming to circular. Sometimes images are
Solution 1:
By the use of Target it may solve you problem.
target = new Target() {
@Override
public void onPrepareLoad(Drawable drawable) {}
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom arg1) {
if(bitmap != null) {
tempView.setImageBitmap(bitmap);
}
}
@Override
public void onBitmapFailed(Drawable drawable) {}
};
...
int dp = (int) resources.getDimension(R.dimen.marker_pic_size);
Picasso.with(context).load(profilePic_url)
.transform(new CircleTransform())
.resize(dp, dp)
.into(target);
tempView.setTag(target);
Post a Comment for "Android - Picasso Misses Pictures Sometimes"