Z
- The type of resource that this target will display in the wrapped ImageView
.public abstract class ImageViewTarget<Z> extends ViewTarget<ImageView,Z> implements Transition.ViewAdapter
view
SIZE_ORIGINAL
Constructor and Description |
---|
ImageViewTarget(ImageView view) |
getRequest, getSize, getView, removeCallback, setRequest, setTagId, toString
onDestroy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getView
public ImageViewTarget(ImageView view)
@Nullable public Drawable getCurrentDrawable()
Drawable
being displayed in the view
using ImageView.getDrawable()
.getCurrentDrawable
in interface Transition.ViewAdapter
public void setDrawable(Drawable drawable)
Drawable
on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable)
.setDrawable
in interface Transition.ViewAdapter
drawable
- The drawable to display in the wrapped view.public void onLoadStarted(@Nullable 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(@Nullable 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 Drawable placeholder)
Drawable
on the view using ImageView.setImageDrawable(android.graphics.drawable.Drawable)
.onLoadCleared
in interface Target<Z>
onLoadCleared
in class ViewTarget<ImageView,Z>
placeholder
- The placeholder drawable to optionally show, or null.public void onResourceReady(Z resource, @Nullable Transition<? super Z> transition)
Target
onResourceReady
in interface Target<Z>
resource
- the loaded resource.public void onStart()
LifecycleListener
Fragment.onStart()
} or Activity.onStart()
is called.onStart
in interface LifecycleListener
onStart
in class BaseTarget<Z>
public void onStop()
LifecycleListener
Fragment.onStop()
} or Activity.onStop()
} is called.onStop
in interface LifecycleListener
onStop
in class BaseTarget<Z>