com.bumptech.glide.request.target
Class PreloadTarget<Z>

java.lang.Object
  extended by com.bumptech.glide.request.target.BaseTarget<Z>
      extended by com.bumptech.glide.request.target.SimpleTarget<Z>
          extended by com.bumptech.glide.request.target.PreloadTarget<Z>
Type Parameters:
Z - The type of resource that will be loaded into memory.
All Implemented Interfaces:
LifecycleListener, Target<Z>

public final class PreloadTarget<Z>
extends SimpleTarget<Z>

A one time use Target class that loads a resource into memory and then clears itself.


Field Summary
 
Fields inherited from interface com.bumptech.glide.request.target.Target
SIZE_ORIGINAL
 
Method Summary
static
<Z> PreloadTarget<Z>
obtain(int width, int height)
          Returns a PreloadTarget.
 void onResourceReady(Z resource, GlideAnimation<? super Z> glideAnimation)
          The method that will be called when the resource load has finished.
 
Methods inherited from class com.bumptech.glide.request.target.SimpleTarget
getSize
 
Methods inherited from class com.bumptech.glide.request.target.BaseTarget
getRequest, onDestroy, onLoadCleared, onLoadFailed, onLoadStarted, onStart, onStop, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

obtain

public static <Z> PreloadTarget<Z> obtain(int width,
                                          int height)
Returns a PreloadTarget.

Type Parameters:
Z - The type of the desired resource.
Parameters:
width - The width in pixels of the desired resource.
height - The height in pixels of the desired resource.

onResourceReady

public void onResourceReady(Z resource,
                            GlideAnimation<? super Z> glideAnimation)
Description copied from interface: Target
The method that will be called when the resource load has finished.

Parameters:
resource - the loaded resource.