Class ThumbnailImageViewTarget<T>
java.lang.Object
com.bumptech.glide.request.target.BaseTarget<Z>
com.bumptech.glide.request.target.ViewTarget<ImageView,Z>
com.bumptech.glide.request.target.ImageViewTarget<T>
com.bumptech.glide.request.target.ThumbnailImageViewTarget<T>
- Type Parameters:
T- The type of resource that will be displayed in the ImageView.
- All Implemented Interfaces:
LifecycleListener,Target<T>,Transition.ViewAdapter
- Direct Known Subclasses:
BitmapThumbnailImageViewTarget,DrawableThumbnailImageViewTarget
Avoids extra calls to
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.
-
Field Summary
Fields inherited from class com.bumptech.glide.request.target.ViewTarget
viewFields inherited from interface com.bumptech.glide.request.target.Target
SIZE_ORIGINAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract DrawablegetDrawable(T resource) protected voidsetResource(T resource) Methods inherited from class com.bumptech.glide.request.target.ImageViewTarget
getCurrentDrawable, onLoadCleared, onLoadFailed, onLoadStarted, onResourceReady, onStart, onStop, setDrawableMethods inherited from class com.bumptech.glide.request.target.ViewTarget
clearOnDetach, getRequest, getSize, getView, removeCallback, setRequest, setTagId, toString, waitForLayoutMethods inherited from class com.bumptech.glide.request.target.BaseTarget
onDestroyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.bumptech.glide.request.transition.Transition.ViewAdapter
getView
-
Constructor Details
-
ThumbnailImageViewTarget
-
ThumbnailImageViewTarget
Deprecated.UseViewTarget.waitForLayout()insetad.
-
-
Method Details
-
setResource
- Specified by:
setResourcein classImageViewTarget<T>
-
getDrawable
-
ViewTarget.waitForLayout()insetad.