19 lines
660 B
Java
19 lines
660 B
Java
package com.bumptech.glide.request.target;
|
|
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.widget.ImageView;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ImageViewTargetFactory {
|
|
public <Z> ViewTarget<ImageView, Z> a(ImageView imageView, Class<Z> cls) {
|
|
if (Bitmap.class.equals(cls)) {
|
|
return new BitmapImageViewTarget(imageView);
|
|
}
|
|
if (Drawable.class.isAssignableFrom(cls)) {
|
|
return new DrawableImageViewTarget(imageView);
|
|
}
|
|
throw new IllegalArgumentException("Unhandled class: " + cls + ", try .as*(Class).transcode(ResourceTranscoder)");
|
|
}
|
|
}
|