I have a lottie animation file and when I put it in a view it becomes too small because of the file’s internal padding. So I have used lottie_scale attribute in xml, and Also LottieComposition as mentioned in some resources like this but none were successful.
Is there any solution?
Answer
I think there are two “semi”-solutions right now:
- install Bodymovin on Adobe After Effects, then import the animation and set its scale to e.g. 500%.
- Scale the Lottie animation view not by Lottie scale, but by using ScaleX, ScaleY:
XML:
android:scaleX="5" android:scaleY="5"
Programmatically:
view.setScaleX(5f); view.setScaleY(5f);