onResourceReady

open fun onResourceReady(resource: R, transition: Transition<out Any>)

A callback that should never be invoked directly.


open fun onResourceReady(    resource: R,     model: Any,     target: Target<R>,     dataSource: DataSource,     isFirstResource: Boolean): Boolean

Called when a load completes successfully, immediately before onResourceReady.

For threading guarantees, see the class comment.

Return

true to prevent onResourceReady from being called on target, typically because the listener wants to update the target or the object the target wraps itself or false to allow onResourceReady to be called on target.

Parameters

resource

The resource that was loaded for the target.

model

The specific model that was used to load the image.

target

The target the model was loaded into.

dataSource

The DataSource the resource was loaded from.

isFirstResource

true if this is the first resource to in this load to be loaded into the target. For example when loading a thumbnail and a full-sized image, this will be true for the first image to load and false for the second.