File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
picasso/src/main/java/com/squareup/picasso Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,9 @@ void complete(BitmapHunter hunter) {
300
300
Bitmap result = hunter .getResult ();
301
301
LoadedFrom from = hunter .getLoadedFrom ();
302
302
303
- for (Action join : joined ) {
303
+ //noinspection ForLoopReplaceableByForEach
304
+ for (int i = 0 , n = joined .size (); i < n ; i ++) {
305
+ Action join = joined .get (i );
304
306
if (join .isCancelled ()) {
305
307
continue ;
306
308
}
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ public class RequestCreator {
39
39
private boolean noFade ;
40
40
private boolean deferred ;
41
41
private int placeholderResId ;
42
- private Drawable placeholderDrawable ;
43
42
private int errorResId ;
43
+ private Drawable placeholderDrawable ;
44
44
private Drawable errorDrawable ;
45
45
46
46
RequestCreator (Picasso picasso , Uri uri , int resourceId ) {
@@ -258,6 +258,10 @@ public void fetch() {
258
258
* {@literal @}Override public void onBitmapFailed() {
259
259
* setBackgroundResource(R.drawable.profile_error);
260
260
* }
261
+ *
262
+ * {@literal @}Override public void onPrepareLoad(Drawable placeHolderDrawable) {
263
+ * frame.setBackgroundDrawable(placeHolderDrawable);
264
+ * }
261
265
* }
262
266
* </pre></blockquote>
263
267
* Implementing on a view holder object for use inside of an adapter:
@@ -273,6 +277,10 @@ public void fetch() {
273
277
* {@literal @}Override public void onBitmapFailed() {
274
278
* frame.setBackgroundResource(R.drawable.profile_error);
275
279
* }
280
+ *
281
+ * {@literal @}Override public void onPrepareLoad(Drawable placeHolderDrawable) {
282
+ * frame.setBackgroundDrawable(placeHolderDrawable);
283
+ * }
276
284
* }
277
285
* </pre></blockquote>
278
286
* <p>
You can’t perform that action at this time.
0 commit comments