Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 741 Bytes

custom_components.md

File metadata and controls

23 lines (19 loc) · 741 Bytes

Custom Components

You also can change how to process the image and how to get the image files through ImageLoader and ImageFileLoader To change this, first, create custom ImagePickerComponents. You could inherit from DefaultImagePickerComponents or directly implements from ImagePickerComponents interface.

class CustomImagePickerComponents(
    context: Context
) : DefaultImagePickerComponents(context.applicationContext) {
    override val imageLoader: ImageLoader
        get() = GrayscaleImageLoader()
}

Then, use it by calling setInternalComponent on ImagePickerComponentsHolder.

ImagePickerComponentsHolder.setInternalComponent(
    CustomImagePickerComponents(context)
)

Happy coding!