ImageLoaderModule

class ImageLoaderModule : NativeImageLoaderAndroidSpec, LifecycleEventListener

Constructors

Link copied to clipboard
constructor(reactContext: ReactApplicationContext)
constructor(reactContext: ReactApplicationContext, callerContext: Any?)
constructor(reactContext: ReactApplicationContext, imagePipeline: ImagePipeline, callerContextFactory: ReactCallerContextFactory)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun abortRequest(requestId: Double)
Link copied to clipboard
open override fun canOverrideExistingModule(): Boolean

Return true if you intend to override some other native module that was registered e.g. as part of a different package (such as the core one). Trying to override without returning true from this method is considered an error and will throw an exception during initialization. By default all modules return false.

Link copied to clipboard
Link copied to clipboard
open override fun getName(): String
Link copied to clipboard
open override fun getSize(uriString: String?, promise: Promise)

Fetch the width and height of the given image.

Link copied to clipboard
open override fun getSizeWithHeaders(uriString: String?, headers: ReadableMap?, promise: Promise)

Fetch the width and height of the given image with headers.

Link copied to clipboard
open override fun initialize()

This method is called after ReactApplicationContext has been created.

Link copied to clipboard
open override fun invalidate()

Allow NativeModule to clean up. Called before React Native instance is destroyed.

Link copied to clipboard

Allow NativeModule to clean up. Called before {CatalystInstance#onHostDestroy}

Link copied to clipboard
open override fun onHostDestroy()

Called when host activity receives destroy event (e.g. Activity.onDestroy. Only called for the last React activity to be destroyed.

Link copied to clipboard
open override fun onHostPause()

Called when host activity receives pause event (e.g. Activity.onPause. Always called for the most current activity.

Link copied to clipboard
open override fun onHostResume()

Called either when the host activity receives a resume event (e.g. Activity.onResume or if the native module that implements this is initialized while the host activity is already resumed. Always called for the most current activity.

Link copied to clipboard
open override fun prefetchImage(uriString: String?, requestIdAsDouble: Double, promise: Promise)

Prefetches the given image to the Fresco image disk cache.

Link copied to clipboard
open override fun queryCache(uris: ReadableArray, promise: Promise)