With ImageView
, I can use the following code to download image with callback
Picasso.with(activity).load(url).into(imageView, new Callback()
{
@Override
public void onSuccess()
{
// do something
}
@Override
public void onError() { }
);
Or simply get the Bitmap from this Picasso.with(activity).load(url).get();
. Is there anyway to add callback for just download the image? If possible please provide sample code, Cheers!
You can create a
Target
and then modify theBitmap
inside the Targets callback methodonBitmapLoaded(...)
. Here is how: