Z - The type of resource that this target will display in the wrapped ImageView.public abstract class ImageViewTarget<Z> extends ViewTarget<android.widget.ImageView,Z> implements Transition.ViewAdapter
Target for displaying resources in ImageViews.viewSIZE_ORIGINAL| Constructor and Description |
|---|
ImageViewTarget(android.widget.ImageView view) |
ImageViewTarget(android.widget.ImageView view,
boolean waitForLayout)
Deprecated.
Use
ViewTarget.waitForLayout() instead. |
| Modifier and Type | Method and Description |
|---|---|
android.graphics.drawable.Drawable |
getCurrentDrawable()
Returns the current
Drawable being displayed in the view
using ImageView.getDrawable(). |
void |
onLoadCleared(android.graphics.drawable.Drawable placeholder)
Sets the given
Drawable on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
void |
onLoadFailed(android.graphics.drawable.Drawable errorDrawable)
Sets the given
Drawable on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
void |
onLoadStarted(android.graphics.drawable.Drawable placeholder)
Sets the given
Drawable on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
void |
onResourceReady(Z resource,
Transition<? super Z> transition)
The method that will be called when the resource load has finished.
|
void |
onStart()
Callback for when
Fragment.onStart()} or Activity.onStart() is called. |
void |
onStop()
Callback for when
Fragment.onStop()} or Activity.onStop()} is called. |
void |
setDrawable(android.graphics.drawable.Drawable drawable)
Sets the given
Drawable on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable). |
protected abstract void |
setResource(Z resource) |
clearOnDetach, getRequest, getSize, getView, removeCallback, setRequest, setTagId, toString, waitForLayoutonDestroyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetViewpublic ImageViewTarget(android.widget.ImageView view)
@Deprecated
public ImageViewTarget(android.widget.ImageView view,
boolean waitForLayout)
ViewTarget.waitForLayout() instead.@Nullable public android.graphics.drawable.Drawable getCurrentDrawable()
Drawable being displayed in the view
using ImageView.getDrawable().getCurrentDrawable in interface Transition.ViewAdapterpublic void setDrawable(android.graphics.drawable.Drawable drawable)
Drawable on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable).setDrawable in interface Transition.ViewAdapterdrawable - The drawable to display in the wrapped view.public void onLoadStarted(@Nullable
android.graphics.drawable.Drawable placeholder)
Drawable on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable).onLoadStarted in interface Target<Z>onLoadStarted in class ViewTarget<android.widget.ImageView,Z>placeholder - The placeholder drawable to optionally show, or null.public void onLoadFailed(@Nullable
android.graphics.drawable.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.public void onLoadCleared(@Nullable
android.graphics.drawable.Drawable placeholder)
Drawable on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable).onLoadCleared in interface Target<Z>onLoadCleared in class ViewTarget<android.widget.ImageView,Z>placeholder - The placeholder drawable to optionally show, or null.public void onResourceReady(@NonNull
Z resource,
@Nullable
Transition<? super Z> transition)
TargetonResourceReady in interface Target<Z>resource - the loaded resource.public void onStart()
LifecycleListenerFragment.onStart()} or Activity.onStart() is called.onStart in interface LifecycleListeneronStart in class BaseTarget<Z>public void onStop()
LifecycleListenerFragment.onStop()} or Activity.onStop()} is called.onStop in interface LifecycleListeneronStop in class BaseTarget<Z>protected abstract void setResource(@Nullable
Z resource)