LottieOverlay.Builder


public final class LottieOverlay.Builder


A builder for LottieOverlay instances.

Summary

Public constructors

Public methods

LottieOverlay
LottieOverlay.Builder

Sets a specific LottieDrawable instance for the overlay.

LottieOverlay.Builder

Sets the StaticOverlaySettings to configure the overlay's visual properties.

LottieOverlay.Builder

Sets the animation playback speed multiplier.

Public constructors

Builder

public Builder(LottieOverlay.LottieProvider lottieProvider)

Public methods

build

public LottieOverlay build()

setLottieDrawable

@CanIgnoreReturnValue
public LottieOverlay.Builder setLottieDrawable(LottieDrawable lottieDrawable)

Sets a specific LottieDrawable instance for the overlay.

By default, an instance of LottieDrawable is created when build is called.

Parameters
LottieDrawable lottieDrawable

The specific LottieDrawable to use.

Returns
LottieOverlay.Builder

This builder, for chaining.

setOverlaySettings

@CanIgnoreReturnValue
public LottieOverlay.Builder setOverlaySettings(StaticOverlaySettings overlaySettings)

Sets the StaticOverlaySettings to configure the overlay's visual properties.

By default, an instance of build is used. This can be overwritten for the default settings like scale and position.

Parameters
StaticOverlaySettings overlaySettings

The settings object defining the overlay's static properties.

Returns
LottieOverlay.Builder

This builder, for chaining.

setSpeed

@CanIgnoreReturnValue
public LottieOverlay.Builder setSpeed(float speed)

Sets the animation playback speed multiplier.

By default, the speed will be set to 1.0f (frames will be synced based on the lottie and playback framerate).

Parameters
float speed

The playback speed. Must be non-negative.

Returns
LottieOverlay.Builder

This builder.