T - The type of resource that will be displayed in the ImageView.public abstract class ThumbnailImageViewTarget<T> extends ImageViewTarget<T>
View.requestLayout() when loading more than once
image into an ImageView with fixed dimensions.
Typically it makes sense
to use this class when loading multiple images with the RequestBuilder.thumbnail(com.bumptech.glide.RequestBuilder) API into views in
a scrolling list like ListView, GridView, or RecyclerView.
FixedSizeDrawable may cause skewing or other undesirable behavior depending on
your images, views, and scaling. If this occurs, consider DrawableImageViewTarget or
BitmapImageViewTarget as alternatives.
viewSIZE_ORIGINAL| Constructor and Description |
|---|
ThumbnailImageViewTarget(ImageView view) |
ThumbnailImageViewTarget(ImageView view,
boolean waitForLayout) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Drawable |
getDrawable(T resource) |
protected void |
setResource(T resource) |
getCurrentDrawable, onLoadCleared, onLoadFailed, onLoadStarted, onResourceReady, onStart, onStop, setDrawablegetRequest, getSize, getView, removeCallback, setRequest, setTagId, toStringonDestroyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetViewpublic ThumbnailImageViewTarget(ImageView view)
public ThumbnailImageViewTarget(ImageView view, boolean waitForLayout)
protected void setResource(@Nullable T resource)
setResource in class ImageViewTarget<T>