我正在使用Airbnb的新库
Lottie在我的应用程序中制作动画.
动画由70 kb JSON文件和328 kb图像文件夹组成.这个文件夹中有13个小png.
根据GitHub回购的指示,我宣布我的观点是这样的
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"/>
然后,在我调用的相关java类上:
mLottieView.setImageAssetsFolder("images");
但是,我有一个问题.动画很笨拙,而且我的记忆用量在屋顶上跳跃.它从13 MB到89,所有这些都发生在主线程上.
你能告诉我有没有办法解决这个问题?
谢谢