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.
view
SIZE_ORIGINAL
Constructor and Description |
---|
ThumbnailImageViewTarget(android.widget.ImageView view) |
ThumbnailImageViewTarget(android.widget.ImageView view,
boolean waitForLayout)
Deprecated.
Use
ViewTarget.waitForLayout() insetad. |
Modifier and Type | Method and Description |
---|---|
protected abstract android.graphics.drawable.Drawable |
getDrawable(T resource) |
protected void |
setResource(T resource) |
getCurrentDrawable, onLoadCleared, onLoadFailed, onLoadStarted, onResourceReady, onStart, onStop, setDrawable
clearOnDetach, getRequest, getSize, getView, removeCallback, setRequest, setTagId, toString, waitForLayout
onDestroy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getView
public ThumbnailImageViewTarget(android.widget.ImageView view)
@Deprecated public ThumbnailImageViewTarget(android.widget.ImageView view, boolean waitForLayout)
ViewTarget.waitForLayout()
insetad.protected void setResource(@Nullable T resource)
setResource
in class ImageViewTarget<T>
protected abstract android.graphics.drawable.Drawable getDrawable(T resource)