-
public final class LottieAnimationKt
-
-
Method Summary
Modifier and Type Method Description final static UnitLottieAnimation(LottieComposition composition, Function0<Float> progress, Modifier modifier, Boolean outlineMasksAndMattes, Boolean applyOpacityToLayers, Boolean enableMergePaths, RenderMode renderMode, Boolean maintainOriginalImageBounds, LottieDynamicProperties dynamicProperties, Alignment alignment, ContentScale contentScale, Boolean clipToCompositionBounds, Map<String, Typeface> fontMap)This is the base LottieAnimation composable. final static UnitLottieAnimation(LottieComposition composition, @FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progress, Modifier modifier, Boolean outlineMasksAndMattes, Boolean applyOpacityToLayers, Boolean enableMergePaths, RenderMode renderMode, Boolean maintainOriginalImageBounds, LottieDynamicProperties dynamicProperties, Alignment alignment, ContentScale contentScale, Boolean clipToCompositionBounds)This is like LottieAnimation except that it takes a raw progress parameter instead of taking a progress provider. final static UnitLottieAnimation(LottieComposition composition, Modifier modifier, Boolean isPlaying, Boolean restartOnPlay, LottieClipSpec clipSpec, Float speed, Integer iterations, Boolean outlineMasksAndMattes, Boolean applyOpacityToLayers, Boolean enableMergePaths, RenderMode renderMode, Boolean reverseOnRepeat, Boolean maintainOriginalImageBounds, LottieDynamicProperties dynamicProperties, Alignment alignment, ContentScale contentScale, Boolean clipToCompositionBounds, Map<String, Typeface> fontMap)This is like LottieAnimation except that it handles driving the animation via animateLottieCompositionAsState instead of taking a progress provider. -
-
Method Detail
-
LottieAnimation
@Composable() final static Unit LottieAnimation(LottieComposition composition, Function0<Float> progress, Modifier modifier, Boolean outlineMasksAndMattes, Boolean applyOpacityToLayers, Boolean enableMergePaths, RenderMode renderMode, Boolean maintainOriginalImageBounds, LottieDynamicProperties dynamicProperties, Alignment alignment, ContentScale contentScale, Boolean clipToCompositionBounds, Map<String, Typeface> fontMap)
This is the base LottieAnimation composable. It takes a composition and renders it at a specific progress.
The overloaded version of LottieAnimation that handles playback and is sufficient for most use cases.
- Parameters:
composition- The composition that will be rendered.progress- A provider for the progress (between 0 and 1) that should be rendered.outlineMasksAndMattes- Enable this to debug slow animations by outlining masks and mattes.applyOpacityToLayers- Sets whether to apply opacity to the each layer instead of shape.enableMergePaths- Enables experimental merge paths support.renderMode- Allows you to specify whether you want Lottie to use hardware or software rendering.maintainOriginalImageBounds- When true, dynamically set bitmaps will be drawn with the exact bounds of the original animation, regardless of the bitmap size.dynamicProperties- Allows you to change the properties of an animation dynamically.alignment- Define where the animation should be placed within this composable if it has a different size than this composable.contentScale- Define how the animation should be scaled if it has a different size than this Composable.clipToCompositionBounds- Determines whether or not Lottie will clip the animation to the original animation composition bounds.fontMap- A map of keys to Typefaces.
-
LottieAnimation
@Composable()@Deprecated(message = Pass progress as a lambda instead of a float. This overload will be removed in the next release.) final static Unit LottieAnimation(LottieComposition composition, @FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progress, Modifier modifier, Boolean outlineMasksAndMattes, Boolean applyOpacityToLayers, Boolean enableMergePaths, RenderMode renderMode, Boolean maintainOriginalImageBounds, LottieDynamicProperties dynamicProperties, Alignment alignment, ContentScale contentScale, Boolean clipToCompositionBounds)
This is like LottieAnimation except that it takes a raw progress parameter instead of taking a progress provider.
-
LottieAnimation
@Composable() final static Unit LottieAnimation(LottieComposition composition, Modifier modifier, Boolean isPlaying, Boolean restartOnPlay, LottieClipSpec clipSpec, Float speed, Integer iterations, Boolean outlineMasksAndMattes, Boolean applyOpacityToLayers, Boolean enableMergePaths, RenderMode renderMode, Boolean reverseOnRepeat, Boolean maintainOriginalImageBounds, LottieDynamicProperties dynamicProperties, Alignment alignment, ContentScale contentScale, Boolean clipToCompositionBounds, Map<String, Typeface> fontMap)
This is like LottieAnimation except that it handles driving the animation via animateLottieCompositionAsState instead of taking a progress provider.
-
-
-
-