Builder

class Builder

Constructors

Link copied to clipboard
constructor()
constructor(engine: FakeImageLoaderEngine)

Functions

Link copied to clipboard
Link copied to clipboard

Set a default Image that will be returned if no OptionalInterceptors handle the request. If a default is not set, any requests not handled by an OptionalInterceptor will throw an exception.

Set the default Interceptor that will be called if no OptionalInterceptors handle the request. If a default is not set, any requests not handled by an OptionalInterceptor will throw an exception.

Link copied to clipboard

Add an interceptor that will return Image if data is equal to an incoming ImageRequest's data.

fun intercept(predicate: (data: Any) -> Boolean, image: Image): FakeImageLoaderEngine.Builder

Add an interceptor that will return Image if predicate returns true.

Add an interceptor that will call interceptor if predicate returns true.

Link copied to clipboard

Set a callback to modify an incoming ImageRequest before it's handled by the interceptors.