I am using the new Airbnb library, Lottie , to make animations in my application.
The animation consists of a 70 kb JSON file and a 328 kb image folder. There are 13 small pngs in this folder.
Following the testimony of the GitHub repo, I declare my opinion as follows
<com.airbnb.lottie.LottieAnimationView android:id="@+id/lottie_view" android:layout_width="match_parent" android:layout_height="wrap_content" app:lottie_fileName="animation.json" android:layout_gravity="bottom" app:lottie_loop="false" app:lottie_autoPlay="true"/>
and then, according to the corresponding java class, I call:
mLottieView.setImageAssetsFolder("images");
However, I have a problem. The animation is awkward and slow, and my memory usage jumps through the roof. It goes from 13 MB to 89, all this happens in the main stream.
Could you tell me if there is a way to solve this?
thanks
source share