Target
An interface that Glide can load a resource into and notify of relevant lifecycle events during a load.
The lifecycle events in this class are as follows:
- onLoadStarted
- onResourceReady
- onLoadCleared
- onLoadFailed
Parameters
<R>
The type of resource the target can display.
Functions
Link copied to clipboard
Retrieves the current request for this target, should not be called outside of Glide.
Link copied to clipboard
A method to retrieve the size of this target.
Link copied to clipboard
A mandatory lifecycle callback that is called when a load is cancelled and its resources are freed.
Link copied to clipboard
A mandatory lifecycle callback that is called when a load fails.
Link copied to clipboard
A lifecycle callback that is called when a load is started.
Link copied to clipboard
abstract fun onResourceReady(resource: R, transition: Transition<out Any>)
Content copied to clipboard
The method that will be called when the resource load has finished.
Link copied to clipboard
Removes the given callback from the pending set if it's still retained.
Link copied to clipboard
Sets the current request for this target to retain, should not be called outside of Glide.