ViewTarget

interface ViewTarget<T : View> : Target

A Target with an associated View. Prefer this to Target if the given drawables will only be used by view.

Optionally, ViewTargets can implement LifecycleObserver. They are automatically registered when the request starts and unregistered when the request completes.

Functions

onError
Link copied to clipboard
open fun onError(error: Drawable?)
Called if an error occurs while executing the request.
onStart
Link copied to clipboard
open fun onStart(placeholder: Drawable?)
Called when the request starts.
onSuccess
Link copied to clipboard
open fun onSuccess(result: Drawable)
Called if the request completes successfully.

Properties

view
Link copied to clipboard
abstract val view: T
The View used by this Target.

Inheritors

PoolableViewTarget
Link copied to clipboard