如何等待Lottie动画完成,然后做某事
我正在学习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;
}
感谢您的帮助
I am learning Xamarin.Forms
I would like to continue some action once my Lottie Anymation finish to play
Here is my xaml code :
<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>
Here is my code :
void OnYesAddWord()
{
//start my animation
MyYesAddWordAnim.IsVisible = true;
MyYesAddWordAnim.PlayAnimation();
//Do something here
//Wait for animation finished then Hide my animation
MyYesAddWordAnim.IsVisible = true;
}
thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您查看 docs ,
andyview
具有onfinedAnimationAnimationAnimation <
事件处理程序if you look at the docs,
AnimationView
has anOnFinishedAnimation
event handler