RequestListener

interface RequestListener<R>

A class for monitoring the status of a request while images load.

All methods in this interface will be called from a background thread if the RequestListener is added to a request that is started with submit, submit, or into. Those methods no longer post results back to the main thread to avoid the unnecessary thread interactions and corresponding latency. As a side affect though, listeners added to those requests are no longer called on the main thread. RequestListeners added to requests started with into or into will continue to be called back on the main thread.

Parameters

<R>

The type of resource being loaded.

Functions

Link copied to clipboard
abstract fun onLoadFailed(    e: GlideException,     model: Any,     target: Target<R>,     isFirstResource: Boolean): Boolean
Called when an exception occurs during a load, immediately before onLoadFailed.
Link copied to clipboard
abstract fun onResourceReady(    resource: R,     model: Any,     target: Target<R>,     dataSource: DataSource,     isFirstResource: Boolean): Boolean
Called when a load completes successfully, immediately before onResourceReady.

Inheritors

Link copied to clipboard
Link copied to clipboard