commit | f6a75698e7c6438792d30ec76403aa7505f9ef8e | [log] [tgz] |
---|---|---|
author | Gabriel Peal <gpeal@users.noreply.github.com> | Wed Jul 14 18:44:29 2021 -0700 |
committer | GitHub <noreply@github.com> | Wed Jul 14 18:44:29 2021 -0700 |
tree | 14e18bfd4494b7f9304bb5441d462a0b8672022e | |
parent | 79cc077e4ba6dffc08bfea66755cb02166bfdea5 [diff] |
[Compose] Allow setting and remapping fonts (#1842) This PR adds 4 APIs to load typefaces in lottie-compose: 1) Using default paths. Fonts are in /assets/fonts/FAMILY_NAME.ttf 2) Overriding the assets subfolder or font file extension 3) Remapping family names to font files in assets 4) Dynamic properties The dynamic properties API can also be used with lottie-android.
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.