com.bumptech.glide.request.target.BitmapImageViewTarget Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glide Show documentation
Show all versions of glide Show documentation
A fast and efficient image loading library for Android focused on smooth scrolling.
package com.bumptech.glide.request.target;
import android.graphics.Bitmap;
import android.widget.ImageView;
/**
* A {@link com.bumptech.glide.request.target.Target} that can display an {@link
* android.graphics.Bitmap} in an {@link android.widget.ImageView}.
*/
public class BitmapImageViewTarget extends ImageViewTarget {
public BitmapImageViewTarget(ImageView view) {
super(view);
}
public BitmapImageViewTarget(ImageView view, boolean waitForLayout) {
super(view, waitForLayout);
}
/**
* Sets the {@link android.graphics.Bitmap} on the view using {@link
* android.widget.ImageView#setImageBitmap(android.graphics.Bitmap)}.
*
* @param resource The bitmap to display.
*/
@Override
protected void setResource(Bitmap resource) {
view.setImageBitmap(resource);
}
}