PreloadTarget

class PreloadTarget<Z> : CustomTarget<T>

A one time use com.bumptech.glide.request.target.Target class that loads a resource into memory and then clears itself.

Parameters

<Z>

The type of resource that will be loaded into memory.

Functions

Link copied to clipboard
fun getSize(cb: SizeReadyCallback)
A method to retrieve the size of this target.
Link copied to clipboard
open fun <Z> obtain(    requestManager: RequestManager,     width: Int,     height: Int): PreloadTarget<Z>
Returns a PreloadTarget.
Link copied to clipboard
open fun onDestroy()
Callback for when onDestroy} or onDestroy is called.
Link copied to clipboard
open fun onLoadCleared(placeholder: Drawable)
A mandatory lifecycle callback that is called when a load is cancelled and its resources are freed.
Link copied to clipboard
open fun onLoadFailed(errorDrawable: Drawable)
A mandatory lifecycle callback that is called when a load fails.
Link copied to clipboard
open fun onLoadStarted(placeholder: Drawable)
A lifecycle callback that is called when a load is started.
Link copied to clipboard
open fun onResourceReady(resource: Z, transition: Transition<out Any>)
The method that will be called when the resource load has finished.
Link copied to clipboard
open fun onStart()
Callback for when onStart} or onStart is called.
Link copied to clipboard
open fun onStop()
Callback for when onStop} or onStop} is called.
Link copied to clipboard
fun removeCallback(cb: SizeReadyCallback)
Removes the given callback from the pending set if it's still retained.

Properties

Link copied to clipboard
open var request: Request
Link copied to clipboard
val SIZE_ORIGINAL: Int
Indicates that we want the resource in its original unmodified width and/or height.