Sunday, 6 September 2020

Lottie animation padding

I have a question for the ones of you who have experience using lottie json files. I am not so experienced using lottie so I thought maybe I am missing some obvious knowledge. When I render my animation into a view, the animation object are placed in the center of the view like that

 _____________________________________________
|                                             |
|        [animated object]                    |
|_____________________________________________|

Is there a way I can modify the json file to make the animated objects fit the whole view like that:

     _____________________________________________
    |                                             |
    | [a n i m a t e d         o b j e c t s     ]|
    |_____________________________________________|

I have tried setting the view in the xml like that:

android:scaleType="centerCrop"
android:adjustViewBounds="true"

but it didn't work
I also tried to set a greater scale:

app:lottie_scale="2" 

but I had no success. Thank you for your time!



from Lottie animation padding

No comments:

Post a Comment