com.bumptech.glide.request.target
Class PreloadTarget<Z>
java.lang.Object
com.bumptech.glide.request.target.BaseTarget<Z>
com.bumptech.glide.request.target.SimpleTarget<Z>
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.
Method Summary |
static
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.