Add After Effect Animation into your Android App using Lottie Library

About Lottie

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 and on the web!
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 .Bodymovin is an After Effects plugin created by Hernan Torrisi that exports After effects files as json and includes a javascript web player. We've built on top of his great work to extend its usage to Android, iOS, and React Native.



Setup of Lottie in Android Project
 
For using this library you must add the dependency of this library in your app level gradel file

compile 'com.airbnb.android:lottie:2.0.0'
 
 
  

Getting and Import .json Animation File 

Create Assets Folder Where The After Effect Animation is placed in the format of .json file and import from the Assets folder where it is required . So Creating the assets Folder do right click on the "Res" Directory and select "new" then "Folder" then "Assets Folder" 

(Right Click On) Res -> New -> Folder -> Assets Folder 



After Creating this folder place the .json file in that folder and for downloading the cool after effect animation in .json as well as .aep format just visit the link given below

Link :  https://www.lottiefiles.com/aep



and i am also using one of them for tutorial

Set The Animation in the layout file

For doing this we import the LottieAnimationView in the layout file where it is required and this view must contains some attributes which is height and width of the layout and file name.


Finally Run Your Android App



Posted By : Tushar Verma
For Full Reference Visit : http://airbnb.io/lottie/android/android.html#sample-app
LinkedIn Profile  : https://www.linkedin.com/in/tushar-verma-047329154/ 

Komentar

Postingan Populer