gpt4 book ai didi

xamarin - Lottie IsPlaying 和循环替换 xamarin 表单

转载 作者:行者123 更新时间:2023-12-05 01:33:00 26 4
gpt4 key购买 nike

我刚刚更新到最新版本的 Lottie;我们正在使用 Xamarin 表单,现在我的应用程序崩溃了,因为它找不到

  1. 正在播放
  2. 循环

谁能告诉我他们被什么取代了?

找不到任何建议替换的内容。

最佳答案

我最近一直在 XF 中与 lottie 打交道,我想我可以帮助你。

  1. IsPlaying

我认为这已被替换为 IsAnimating="{Binding IsAnimating}"

  1. Loop

没有确切的替代品。如果您想要一个无限循环,您可以使用 RepeatMode="Infinite" 并省略设置 RepeatCount 字段。

如果您想播放特定次数的动画,您可以跳过 RepeatMode 字段,而只需设置 RepeatCount="1"。这将重复动画一次。如果您希望它只播放一次然后停止,您可以完全跳过 RepeatCount 字段或将其设置为 RepeatCount="0"

RepeatMode 字段也可以与 RepeatCount 字段结合使用,但我还没有测试过它的不同模式。

这是我的 xaml 中的示例。它无限循环 animation.json。

<forms:AnimationView
x:Name="animationView"
Animation="animation.json"
AutoPlay="True"
RepeatMode="Infinite"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand" />

关于xamarin - Lottie IsPlaying 和循环替换 xamarin 表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64934574/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com