Builder
interface Builder
Content copied to clipboard
Functions
attachWidgetsTo
Link copied to clipboard
abstract fun attachWidgetsTo(viewStub: ViewStub?): LensesComponent.Builder
Content copied to clipboard
Uses the provided viewStub to inflate view hierarchy of the lens widgets (like media picker) which otherwise appear above the lenses carousel.
build
Link copied to clipboard
Builds an instance of LensesComponent with the configuration of this builder and starts the internal lifecycle which can be disposed by calling LensesComponent.close.
configureCache
Link copied to clipboard
abstract fun configureCache(withConfiguration: @JvmSuppressWildcards() Consumer<LensesComponent.Cache.Configuration>): LensesComponent.Builder
Content copied to clipboard
configureCarousel
Link copied to clipboard
abstract fun configureCarousel(withConfiguration: @JvmSuppressWildcards() Consumer<LensesComponent.Carousel.Configuration>): LensesComponent.Builder
Content copied to clipboard
Allows to enable and configure lenses carousel feature by receiving Carousel.Configuration in the provided Consumer.
configureHints
Link copied to clipboard
abstract fun configureHints(withConfiguration: @JvmSuppressWildcards() Consumer<LensesComponent.Hints.Configuration>): LensesComponent.Builder
Content copied to clipboard
Allows to enable and configure lens hints feature by receiving Hints.Configuration in the provided Consumer.
configureLoadingOverlay
Link copied to clipboard
abstract fun configureLoadingOverlay(withConfiguration: @JvmSuppressWildcards() Consumer<LensesComponent.LoadingOverlay.Configuration>): LensesComponent.Builder
Content copied to clipboard
Allows to enable and configure lens loading overlay feature by receiving LoadingOverlay.Configuration in the provided Consumer.
configureMediaPicker
Link copied to clipboard
abstract fun configureMediaPicker(withConfiguration: @JvmSuppressWildcards() Consumer<LensesComponent.MediaPicker.Configuration>): LensesComponent.Builder
Content copied to clipboard
Allows to enable and configure lens media picker feature by receiving MediaPicker.Configuration in the provided Consumer.
configureProcessor
Link copied to clipboard
abstract fun configureProcessor(withConfiguration: @JvmSuppressWildcards() Consumer<LensesComponent.Processor.Configuration>): LensesComponent.Builder
Content copied to clipboard
dispatchTouchEventsTo
Link copied to clipboard
Allows to receive touch events that were not handled by LensesComponent, if any views are configured to be shown, see com.snap.camerakit.Session.Builder.imageProcessorSource.
remoteApiServiceFactory
Link copied to clipboard
abstract fun remoteApiServiceFactory(value: LensesComponent.RemoteApiService.Factory): LensesComponent.Builder
Content copied to clipboard
Allows to provide a RemoteApiService.Factory called per each lifecycle of a lens which sends requests to a remote API service.