ismai117 / kottie

Render After Effects Animations Library - Compose Multiplatform | Inspired by Airbnb/Lottie

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Animations not shown if KottieAnimation doesn't get fixed size

OSemenovBoyarka opened this issue · comments

In my usecase I want KottieAnimation to take max available width, and then pick proper height to maintain animation file aspect ratio.
Something like this:

   KottieAnimation(
        modifier = Modifier.fillMaxWidth(),
        composition = composition,
        progress = { animationState.progress },
        backgroundColor = backgroundColor
    )

That worked like a charm with Kottie 1.6.3 and Compose Multiplatform 1.6.0.
However, after I've updated to Compose 1.6.11 and Kottie 1.9.6-alpha02 - animations don't appear anymore (reproducible on iOS and Android).

As a workaround - it works fine if I set specific size or aspectRatio via the modifier.

I've now added a Default Size in the latest version 1.9.6