com.bumptech.glide.request.target
Class GlideDrawableImageViewTarget
java.lang.Object
com.bumptech.glide.request.target.BaseTarget<Z>
com.bumptech.glide.request.target.ViewTarget<ImageView,Z>
com.bumptech.glide.request.target.ImageViewTarget<GlideDrawable>
com.bumptech.glide.request.target.GlideDrawableImageViewTarget
- All Implemented Interfaces:
- LifecycleListener, GlideAnimation.ViewAdapter, Target<GlideDrawable>
public class GlideDrawableImageViewTarget
- extends ImageViewTarget<GlideDrawable>
A Target
that can display an Drawable
in
an ImageView
.
Fields inherited from class com.bumptech.glide.request.target.ViewTarget |
view |
GlideDrawableImageViewTarget
public GlideDrawableImageViewTarget(ImageView view)
- Constructor for an
Target
that can display an
GlideDrawable
in an ImageView
.
- Parameters:
view
- The view to display the drawable in.
GlideDrawableImageViewTarget
public GlideDrawableImageViewTarget(ImageView view,
int maxLoopCount)
- Constructor for an
Target
that can display an
GlideDrawable
in an ImageView
.
- Parameters:
view
- The view to display the drawable in.maxLoopCount
- A value to pass to to GlideDrawable
s
indicating how many times they should repeat their animation (if they have one). See
GlideDrawable.setLoopCount(int)
.
onResourceReady
public void onResourceReady(GlideDrawable resource,
GlideAnimation<? super GlideDrawable> animation)
- The method that will be called when the resource load has finished.
If no
GlideAnimation
is given or if the animation does not set the
Drawable
on the view, the drawable is set using
ImageView.setImageDrawable(android.graphics.drawable.Drawable)
.
- Specified by:
onResourceReady
in interface Target<GlideDrawable>
- Overrides:
onResourceReady
in class ImageViewTarget<GlideDrawable>
- Parameters:
resource
- the loaded resource.animation
-
setResource
protected void setResource(GlideDrawable resource)
- Sets the drawable on the view using
ImageView.setImageDrawable(android.graphics.drawable.Drawable)
.
- Specified by:
setResource
in class ImageViewTarget<GlideDrawable>
- Parameters:
resource
- The Drawable
to display in the view.
onStart
public void onStart()
- Description copied from class:
BaseTarget
- Callback for when
Fragment.onStart()
} or Activity.onStart()
is called.
- Specified by:
onStart
in interface LifecycleListener
- Overrides:
onStart
in class BaseTarget<GlideDrawable>
onStop
public void onStop()
- Description copied from class:
BaseTarget
- Callback for when
Fragment.onStop()
} or Activity.onStop()
} is called.
- Specified by:
onStop
in interface LifecycleListener
- Overrides:
onStop
in class BaseTarget<GlideDrawable>