Builder

interface Builder

Functions

attachWidgetsTo
Link copied to clipboard
abstract fun attachWidgetsTo(viewStub: ViewStub?): LensesComponent.Builder
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
abstract fun build(): LensesComponent
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
Allows to configure lenses cache by receiving Cache.Configuration in the provided Consumer.
configureCarousel
Link 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
Allows to enable and configure lens hints feature by receiving Hints.Configuration in the provided Consumer.
configureLoadingOverlay
Link 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
Allows to enable and configure lens media picker feature by receiving MediaPicker.Configuration in the provided Consumer.
configureProcessor
Link copied to clipboard
Allows to configure lenses processor by receiving Processor.Configuration in the provided Consumer.
dispatchTouchEventsTo
Link copied to clipboard
abstract fun dispatchTouchEventsTo(view: View?): LensesComponent.Builder
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
Allows to provide a RemoteApiService.Factory called per each lifecycle of a lens which sends requests to a remote API service.