How to listen for Picasso (Android) load complete events?

You can use a Callback to get onSuccess and onError events. Just add a new Callback to your request like so: Picasso.with(getContext()) .load(url) .into(imageView, new com.squareup.picasso.Callback() { @Override public void onSuccess() { } @Override public void onError() { } }); Then you can perform any alterations and modifications in the onSuccess callback.

android:load svg file from web and show it on image view

Update: For newer version please checkout the Glide Samples (https://github.com/bumptech/glide/tree/master/samples/svg) – You can use Glide (https://github.com/bumptech/glide/tree/v3.6.0) and AndroidSVG (https://bitbucket.org/paullebeau/androidsvg). There is also a sample from Glide: https://github.com/bumptech/glide/tree/v3.6.0/samples/svg/src/main/java/com/bumptech/svgsample/app Setup GenericRequestBuilder requestBuilder = Glide.with(mActivity) .using(Glide.buildStreamModelLoader(Uri.class, mActivity), InputStream.class) .from(Uri.class) .as(SVG.class) .transcode(new SvgDrawableTranscoder(), PictureDrawable.class) .sourceEncoder(new StreamEncoder()) .cacheDecoder(new FileToStreamDecoder<SVG>(new SvgDecoder())) .decoder(new SvgDecoder()) .placeholder(R.drawable.ic_facebook) .error(R.drawable.ic_web) .animate(android.R.anim.fade_in) .listener(new SvgSoftwareLayerSetter<Uri>()); Use RequestBuilder with … Read more

Doesn’t Picasso support to download images which uses https protocol

Use those dependencies in your Gradle: compile ‘com.squareup.okhttp:okhttp:2.2.0’ compile ‘com.squareup.okhttp:okhttp-urlconnection:2.2.0’ compile ‘com.squareup.picasso:picasso:2.4.0’ And this class instead of the original Picasso class Picasso class: public class PicassoTrustAll { private static Picasso mInstance = null; private PicassoTrustAll(Context context) { OkHttpClient client = new OkHttpClient(); client.setHostnameVerifier(new HostnameVerifier() { @Override public boolean verify(String s, SSLSession sslSession) { return true; … Read more

Saving image from url using Picasso?

Solved. now works fine! I did //save image public static void imageDownload(Context ctx, String url){ Picasso.with(ctx) .load(“http://blog.concretesolutions.com.br/wp-content/uploads/2015/04/Android1.png”) .into(getTarget(url)); } //target to save private static Target getTarget(final String url){ Target target = new Target(){ @Override public void onBitmapLoaded(final Bitmap bitmap, Picasso.LoadedFrom from) { new Thread(new Runnable() { @Override public void run() { File file = new … Read more

Resize image to full width and variable height with Picasso

As of Picasso 2.4.0, this operation is now directly supported. Simply add a .resize() request with one of the dimensions as 0. For example, to have a variable width, your call would become: Picasso.with(this.context) .load(message_pic_url) .placeholder(R.drawable.profile_wall_picture) .resize(0, holder.message_picture.getHeight()), .into(holder.message_picture); Note that this call uses .getHeight() and therefore assumes the message_picture has already been measured. If … Read more