lottie-android README

The project's README from github.com/airbnb/lottie-android. As one markdown file: README.md.

Lottie for Android, iOS, React Native, Web, and Windows

Build Status

Get it on Google Play

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:

Sponsors

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

Sponsor Button

Lead Sponsors

Lottiefiles

Lottie Lab

Airbnb

Stream

Emerge Tools

Coinbase

View documentation, FAQ, help, examples, and more at airbnb.io/lottie

Example1

Example2

Example3

Community

Example4

Download

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: lottieVersion

The latest stable Lottie-Compose version is: lottieVersion 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.

Contributing

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.

lottie-android (airbnb/lottie-android)

Searching Database…

这是什么?Lottie 是一个移动端库,可以解析通过 Bodymovin 插件导出为 JSON 的 Adobe After Effects 动画,并在 Android、iOS、Web 和 React Native 上原生渲染。
它是界面框架,还是只是动画渲染器?它是一个渲染库,可以集成到应用中,以原生方式播放矢量动画;它不是完整的界面框架,只是动画引擎(并为 Jetpack Compose 提供了专门的 Lottie-Compose 封装)。
我要怎么把它添加到 Android 项目中?在模块的 build.gradle 文件中添加 Lottie 依赖;Gradle 是唯一受支持的构建配置方式。
我需要先迁移到 AndroidX 吗?需要。Lottie 2.8.0 及更高版本只支持已迁移到 AndroidX 的项目。
它能配合正式版 Android Gradle Plugin 使用,还是需要 canary 构建版本?如果要为项目本身贡献代码,需要使用 Android Studio Canary 构建版本,因为 AGP 的跟踪版本紧随最新的 canary 版本;但在你自己的应用中使用该库,只需要标准的 Gradle 即可。
动画是谁制作的——设计师还是工程师?设计师使用 Bodymovin 直接在 After Effects 中制作并导出动画,因此工程师不再需要在代码里手动重现动效。
Lottie 生态覆盖哪些平台?除了这个 Android 仓库,Lottie 还有适用于 iOS、Web、React Native 和 Windows 的同类实现,它们都使用相同的 JSON 动画格式。
在哪里可以找到文档和示例?完整的文档、常见问题、帮助和示例都托管在 airbnb.io/lottie。
我可以在 Jetpack Compose 中使用 Lottie 吗?可以,有一个单独的 Lottie-Compose 构件,它有自己的版本号,可用于基于 Compose 的应用。
这个项目还在积极维护吗?README 中说明,该项目由贡献者利用业余时间(晚上和周末)维护,并希望用户考虑赞助,以帮助持续改进。
Creator
airbnb
Size
134.2 MB
Stars
35.8K
Age
10y
Commits · 90 Days