Skip to content

Commit

Permalink
Added a target view into the ConfigProvider method declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
s0nerik committed Sep 27, 2016
1 parent 5227a11 commit f3bac4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ private static <T> void loadImage(
GlideBindingConfig.Provider configProvider;
DrawableRequestBuilder<?> requestBuilder;
if ((configProvider = GlideBindingConfig.getProvider(configProviderKey)) != null) {
requestBuilder = configProvider.provide(drawableRequest);
requestBuilder = configProvider.provide(iv, drawableRequest);
} else if ((configProvider = GlideBindingConfig.getDefaultProvider()) != null) {
requestBuilder = configProvider.provide(drawableRequest);
requestBuilder = configProvider.provide(iv, drawableRequest);
} else {
requestBuilder = drawableRequest;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.s0nerik.glide_bindingadapter;

import android.support.annotation.NonNull;
import android.widget.ImageView;

import com.bumptech.glide.DrawableRequestBuilder;
import com.bumptech.glide.DrawableTypeRequest;
Expand All @@ -11,7 +12,7 @@
public class GlideBindingConfig {
public interface Provider {
@NonNull
DrawableRequestBuilder<?> provide(DrawableTypeRequest<?> request);
DrawableRequestBuilder<?> provide(ImageView target, DrawableTypeRequest<?> request);
}

private static Map<Object, Provider> providers = new HashMap<>();
Expand Down

0 comments on commit f3bac4a

Please sign in to comment.