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
构造器和说明 |
---|
ThumbnailImageViewTarget(ImageView view) |
ThumbnailImageViewTarget(ImageView view,
boolean waitForLayout)
已过时。
Use
ViewTarget.waitForLayout() insetad. |
限定符和类型 | 方法和说明 |
---|---|
protected abstract 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(ImageView view)
@Deprecated public ThumbnailImageViewTarget(ImageView view, boolean waitForLayout)
ViewTarget.waitForLayout()
insetad.protected void setResource(@Nullable T resource)
setResource
在类中 ImageViewTarget<T>