我想在我的 DialogFragment 中膨胀一个布局文件,它只包含一个 LottieAnimationView
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/animViewTest1"
android:layout_height="100dp"
android:layout_width="100dp"
app:lottie_fileName="json_Saved.json"
app:lottie_loop="false"
app:lottie_autoPlay="false"
/>
我希望片段显示出来,播放一次动画,并在动画完成后自动关闭。
我可以访问 AnimView
animView = view.FindViewById<LottieAnimationView>(Resource.Id.animViewTest1);
animView.PlayAnimation();
但我找不到方法来获得onAnimationEnd
方法或类似的东西。
我发现了这个类似的问题:How to know when lottie animation is done?
但这并没有帮助我使它适用于我的情况。