FakeImageLoaderEngine
An ImageLoader interceptor that intercepts all incoming requests before they're fetched and decoded by the image loader's real image engine. This class is useful for overriding an image loader's responses in tests:
val engine = FakeImageLoaderEngine.Builder()
.intercept("https://www.example.com/image.jpg", FakeImage())
.intercept({ it is String && it.endsWith("test.png") }, FakeImage())
.default(FakeImage(color = 0x0000FF))
.build()
val imageLoader = ImageLoader.Builder(context)
.components { add(engine) }
.build()
Content copied to clipboard
Types
Link copied to clipboard
An Interceptor that can either:
Link copied to clipboard
A callback to support modifying an ImageRequest before it's handled by the OptionalInterceptors.
Link copied to clipboard
Link copied to clipboard
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Create a new FakeImageLoaderEngine.Builder with the same configuration.