-
- All Implemented Interfaces:
-
com.mobwith.imgmodule.manager.LifecycleListener,com.mobwith.imgmodule.request.target.Target,com.mobwith.imgmodule.request.transition.Transition.ViewAdapter
public abstract class ImageViewTarget<Z> extends ViewTarget<ImageView, Z> implements Transition.ViewAdapter
A base com.mobwith.imgmodule.request.target.Target for displaying resources in s.
-
-
Constructor Summary
Constructors Constructor Description ImageViewTarget(ImageView view)ImageViewTarget(ImageView view, boolean waitForLayout)
-
Method Summary
Modifier and Type Method Description DrawablegetCurrentDrawable()Returns the current Drawable being displayed in the viewusing getDrawable. voidsetDrawable(Drawable drawable)Sets the given Drawable on the view using . voidonLoadStarted(@Nullable() Drawable placeholder)Sets the given Drawable on the view using . voidonLoadFailed(@Nullable() Drawable errorDrawable)Sets the given Drawable on the view using . voidonLoadCleared(@Nullable() Drawable placeholder)Sets the given Drawable on the view using . voidonResourceReady(@NonNull() Z resource, @Nullable() Transition<out Object> transition)The method that will be called when the resource load has finished. voidonStart()Callback for when onStart} or is called. voidonStop()Callback for when onStop} or } is called. -
Methods inherited from class com.mobwith.imgmodule.request.target.ViewTarget
clearOnDetach, getRequest, getSize, getView, removeCallback, setRequest, setTagId, toString, waitForLayout -
Methods inherited from class com.mobwith.imgmodule.request.target.BaseTarget
onDestroy -
Methods inherited from class com.mobwith.imgmodule.request.target.Target
onResourceReady -
Methods inherited from class com.mobwith.imgmodule.request.transition.Transition.ViewAdapter
getView -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getCurrentDrawable
@Nullable() Drawable getCurrentDrawable()
Returns the current Drawable being displayed in the viewusing getDrawable.
-
setDrawable
void setDrawable(Drawable drawable)
Sets the given Drawable on the view using .
- Parameters:
drawable- The drawable to display in the wrapped view.
-
onLoadStarted
void onLoadStarted(@Nullable() Drawable placeholder)
Sets the given Drawable on the view using .
- Parameters:
placeholder- The placeholder drawable to optionally show, or null.
-
onLoadFailed
void onLoadFailed(@Nullable() Drawable errorDrawable)
Sets the given Drawable on the view using .
- Parameters:
errorDrawable- The error drawable to optionally show, or null.
-
onLoadCleared
void onLoadCleared(@Nullable() Drawable placeholder)
Sets the given Drawable on the view using .
- Parameters:
placeholder- The placeholder drawable to optionally show, or null.
-
onResourceReady
void onResourceReady(@NonNull() Z resource, @Nullable() Transition<out Object> transition)
The method that will be called when the resource load has finished.
- Parameters:
resource- the loaded resource.
-
-
-
-