Source:
private void into(ImageView target, Callback callback, WeakReference<Callback> callbackRef) { long started = System.nanoTime(); checkMain(); if (target == null) { throw new IllegalArgumentException("Target must not be null."); } if (callback != null && callbackRef != null) { throw new IllegalArgumentException("Either callback or callbackRef, or both, must be null."); } if (!data.hasImage()) { picasso.cancelRequest(target); setPlaceholder(target, placeholderResId, placeholderDrawable); return; } if (deferred) { if (data.hasSize()) { throw new IllegalStateException("Fit cannot be used with resize."); } int width = target.getWidth(); int height = target.getHeight(); if (width == 0 || height == 0) { setPlaceholder(target, placeholderResId, placeholderDrawable); if (callbackRef != null) { picasso.defer(target, new DeferredRequestCreator(this, target, callbackRef)); } else { picasso.defer(target, new DeferredRequestCreator(this, target, callback)); } return; } data.resize(width, height); } Request request = createRequest(started); String requestKey = createKey(request); if (!skipMemoryCache) { Bitmap bitmap = picasso.quickMemoryCacheCheck(requestKey); if (bitmap != null) { picasso.cancelRequest(target); setBitmap(target, picasso.context, bitmap, MEMORY, noFade, picasso.indicatorsEnabled); if (picasso.loggingEnabled) { log(OWNER_MAIN, VERB_COMPLETED, request.plainId(), "from " + MEMORY); } if (getCallback(callback, callbackRef) != null) { getCallback(callback, callbackRef).onSuccess(); } return; } } setPlaceholder(target, placeholderResId, placeholderDrawable); Action action = null; if (callback != null) { action = new ImageViewAction(picasso, target, request, skipMemoryCache, noFade, errorResId, errorDrawable, requestKey, callback); } else { action = new ImageViewAction(picasso, target, request, skipMemoryCache, noFade, errorResId, errorDrawable, requestKey, callbackRef); } picasso.enqueueAndSubmit(action); }

Target:
private void into(ImageView target, Callback callback, WeakReference<Callback> callbackRef) { long started = System.nanoTime(); checkMain(); if (target == null) { throw new IllegalArgumentException("Target must not be null."); } if (callback != null && callbackRef != null) { throw new AssertionError("Either callback or callbackRef, or both, must be null."); } if (!data.hasImage()) { picasso.cancelRequest(target); setPlaceholder(target, placeholderResId, placeholderDrawable); return; } if (deferred) { if (data.hasSize()) { throw new IllegalStateException("Fit cannot be used with resize."); } int width = target.getWidth(); int height = target.getHeight(); if (width == 0 || height == 0) { setPlaceholder(target, placeholderResId, placeholderDrawable); if (callbackRef != null) { picasso.defer(target, new DeferredRequestCreator(this, target, callbackRef)); } else { picasso.defer(target, new DeferredRequestCreator(this, target, callback)); } return; } data.resize(width, height); } Request request = createRequest(started); String requestKey = createKey(request); if (!skipMemoryCache) { Bitmap bitmap = picasso.quickMemoryCacheCheck(requestKey); if (bitmap != null) { picasso.cancelRequest(target); setBitmap(target, picasso.context, bitmap, MEMORY, noFade, picasso.indicatorsEnabled); if (picasso.loggingEnabled) { log(OWNER_MAIN, VERB_COMPLETED, request.plainId(), "from " + MEMORY); } Callback realCallback = getCallback(callback, callbackRef); if (realCallback != null) { realCallback.onSuccess(); } return; } } setPlaceholder(target, placeholderResId, placeholderDrawable); Action action = null; if (callback != null) { action = new ImageViewAction(picasso, target, request, skipMemoryCache, noFade, errorResId, errorDrawable, requestKey, callback); } else { action = new ImageViewAction(picasso, target, request, skipMemoryCache, noFade, errorResId, errorDrawable, requestKey, callbackRef); } picasso.enqueueAndSubmit(action); }