commit | 3f39884cb0d0dddd86673b3826aad6fa508416ab | [log] [tgz] |
---|---|---|
author | Niklas Baudy <niklas.baudy@vanniktech.de> | Thu Aug 01 20:50:21 2024 +0200 |
committer | GitHub <noreply@github.com> | Thu Aug 01 14:50:21 2024 -0400 |
tree | d715a6848b063185531a9de657eeb4b4c1429e09 | |
parent | 71c1622ae3c145e5afaf6bbdd0a2edd274f49864 [diff] |
LottieComposition: Add getUnscaledHeight & getUnscaledWidth functions. (#2514) Use case: I just want to know the unscaled original height / width of the LottieAnimation. I want to do my own scaling by calculating for instance given an aspect ratio or weighted settings, how big/small I can stretch the animation.
Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!
For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:
Lottie is maintained and improved on nights and weekends. If you use Lottie in your app, please consider sponsoring it to help ensure that we can continue to improve the project we love. Click the sponsor button above to learn more
Gradle is the only supported build configuration, so just add the dependency to your project build.gradle
file:
dependencies { implementation 'com.airbnb.android:lottie:$lottieVersion' }
The latest Lottie version is:
The latest stable Lottie-Compose version is: Click here for more information on Lottie-Compose.
Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.
Because development has started for Lottie Compose, Gradle, and the Android Gradle Plugin will be kept up to date with the latest canaries. This also requires you to use Android Studio Canary builds. Preview builds can be installed side by side with stable versions.