-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
All of the examples I have seen assign the source in XAML; I have tried to do it in code without success:
var source = new SKFileLottieImageSource()
{
File = String.Format("{0}.json", Name)
};
var view = new SKLottieView()
{
Source = source,
WidthRequest = 400,
HeightRequest = 400,
BackgroundColor = Colors.Red,
RepeatMode = SKLottieRepeatMode.Restart,
RepeatCount = Loop ? -1 : 0,
//Scale = Scale,
StyleId = ID
};
The view renders to the screen but the animation does not appear.
I see in the source that the file is ultimately loaded using FileSystem.OpenAppPackageFileAsync and so I tested that with the file path I used in SKFileLottieImageSource, and it worked.
Also, I know the Lottie file I am using works, as it did fine in the Xamarin Forms app that we are attempting to migrate to MAUI.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels