Z - The type of resource that this target will display in the wrapped ImageView.public abstract class ImageViewTarget<Z> extends ViewTarget<ImageView,Z> implements GlideAnimation.ViewAdapter
viewSIZE_ORIGINAL| Constructor and Description |
|---|
ImageViewTarget(ImageView view) |
| Modifier and Type | Method and Description |
|---|---|
Drawable |
getCurrentDrawable()
Returns the current
Drawable being displayed in the view using
ImageView.getDrawable(). |
void |
onLoadCleared(Drawable placeholder)
Sets the given
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
void |
onLoadFailed(Exception e,
Drawable errorDrawable)
Sets the given
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
void |
onLoadStarted(Drawable placeholder)
Sets the given
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
void |
onResourceReady(Z resource,
GlideAnimation<? super Z> glideAnimation)
The method that will be called when the resource load has finished.
|
void |
setDrawable(Drawable drawable)
Sets the given
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
protected abstract void |
setResource(Z resource) |
getRequest, getSize, getView, setRequest, setTagId, toStringonDestroy, onStart, onStopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetViewpublic ImageViewTarget(ImageView view)
public Drawable getCurrentDrawable()
Drawable being displayed in the view using
ImageView.getDrawable().getCurrentDrawable in interface GlideAnimation.ViewAdapterpublic void setDrawable(Drawable drawable)
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable).setDrawable in interface GlideAnimation.ViewAdapterdrawable - The drawable to display in the wrapped view.public void onLoadStarted(Drawable placeholder)
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable).onLoadStarted in interface Target<Z>onLoadStarted in class BaseTarget<Z>placeholder - The placeholder drawable to optionally show, or null.public void onLoadFailed(Exception e, Drawable errorDrawable)
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable).onLoadFailed in interface Target<Z>onLoadFailed in class BaseTarget<Z>errorDrawable - The error drawable to optionally show, or null.e - The exception causing the load to fail, or null if no exception occurred (usually because a decoder
simply returned null).public void onLoadCleared(Drawable placeholder)
Drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable).onLoadCleared in interface Target<Z>onLoadCleared in class BaseTarget<Z>placeholder - The placeholder drawable to optionally show, or null.public void onResourceReady(Z resource, GlideAnimation<? super Z> glideAnimation)
TargetonResourceReady in interface Target<Z>resource - the loaded resource.protected abstract void setResource(Z resource)