|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bumptech.glide.request.GenericRequest<A,T,Z,R>
A - The type of the model that the resource will be loaded from.T - The type of the data that the resource will be loaded from.Z - The type of the resource that will be loaded.R - The type of the resource that will be transcoded from the loaded resource.public final class GenericRequest<A,T,Z,R>
A Request that loads a Resource into a given Target.
| Method Summary | ||
|---|---|---|
void |
begin()
Starts an asynchronous load. |
|
void |
clear()
Cancels the current load if it is in progress, clears any resources held onto by the request and replaces the loaded resource if the load completed with the placeholder. |
|
boolean |
isComplete()
Returns true if the request has successfully completed. |
|
boolean |
isFailed()
Returns true if the request has failed. |
|
boolean |
isRunning()
Returns true if this request is running and has not completed or failed. |
|
static
|
obtain(LoadProvider<A,T,Z,R> loadProvider,
A model,
Context context,
Priority priority,
Target<R> target,
float sizeMultiplier,
Drawable placeholderDrawable,
int placeholderResourceId,
Drawable errorDrawable,
int errorResourceId,
RequestListener<A,R> requestListener,
RequestCoordinator requestCoordinator,
Engine engine,
Transformation<Z> transformation,
Class<R> transcodeClass,
boolean isMemoryCacheable,
GlideAnimationFactory<R> animationFactory,
int overrideWidth,
int overrideHeight,
DiskCacheStrategy diskCacheStrategy)
|
|
void |
onException(Exception e)
A callback method that should never be invoked directly. |
|
void |
onResourceReady(Resource<?> resource)
A callback method that should never be invoked directly. |
|
void |
onSizeReady(int width,
int height)
A callback method that should never be invoked directly. |
|
void |
recycle()
Recycles the request object and releases its resources. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <A,T,Z,R> GenericRequest<A,T,Z,R> obtain(LoadProvider<A,T,Z,R> loadProvider,
A model,
Context context,
Priority priority,
Target<R> target,
float sizeMultiplier,
Drawable placeholderDrawable,
int placeholderResourceId,
Drawable errorDrawable,
int errorResourceId,
RequestListener<A,R> requestListener,
RequestCoordinator requestCoordinator,
Engine engine,
Transformation<Z> transformation,
Class<R> transcodeClass,
boolean isMemoryCacheable,
GlideAnimationFactory<R> animationFactory,
int overrideWidth,
int overrideHeight,
DiskCacheStrategy diskCacheStrategy)
public void recycle()
Request
recycle in interface Requestpublic void begin()
begin in interface Requestpublic void clear()
Cleared requests can be restarted with a subsequent call to begin()
clear in interface Requestcancel()public boolean isRunning()
isRunning in interface Requestpublic boolean isComplete()
isComplete in interface Requestpublic boolean isFailed()
isFailed in interface Request
public void onSizeReady(int width,
int height)
onSizeReady in interface SizeReadyCallbackwidth - The width of the target.height - The height of the target.public void onResourceReady(Resource<?> resource)
onResourceReady in interface ResourceCallbackresource - The loaded resource.public void onException(Exception e)
onException in interface ResourceCallbacke - The exception that caused the failure, or null it the load failed for some reason other than an
exception.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||