[英]How to wait for lottie animation to finish then do something
我正在学习 Xamarin.Forms
一旦我的 Lottie Anymation 玩完,我想继续一些动作
这是我的 xaml 代码:
<forms:AnimationView Grid.Column="1" IsVisible="False"
x:Name="MyYesAddWordAnim"
Animation="YesAddAnim.json"
RepeatMode="Infinite"
HeightRequest="40"
WidthRequest="40"
VerticalOptions="FillAndExpand"
HorizontalOptions="CenterAndExpand"
ClassId="2">
</forms:AnimationView>
这是我的代码:
void OnYesAddWord()
{
//start my animation
MyYesAddWordAnim.IsVisible = true;
MyYesAddWordAnim.PlayAnimation();
//Do something here
//Wait for animation finished then Hide my animation
MyYesAddWordAnim.IsVisible = true;
}
感谢您的帮助
如果您查看文档, AnimationView
有一个OnFinishedAnimation
事件处理程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.