We're currently working on support for Android.
In the meantime, you can use the patched version of LottieCompositionFactory
the lottie-android library.
Copy or clone the file DotLottieCompositionFactory.java
into your project, and replace instances of LottieCompositionFactory
with DotLottieCompositionFactory
DotLottieCompositionFactory.fromRawRes(this, R.raw.lottie_resource)
.addListener {
animationView.setComposition(it)
animationView.playAnimation()
}
.addFailureListener {
it.printStackTrace()
}
- Currently only accepts single animations.
- No support for setting animations in XML yet.