SkiaSharp.Extended
SkiaSharp.Extended copied to clipboard
[BUG] Animation not playing when inherit from SKLottieView
Description
If I inherit from SKLottieView and use this class for showing an animation, the animation is not running / visible. We want to use inheritance to make some customization.
Code
I'm using inheritance like this. If I use CustomSKLottieView, it does not show the animation (see reproduction sample).
public class CustomSKLottieView : SKLottieView
{
}
Expected Behavior Animations also work when using inheritance.
Actual Behavior
Animation are not working when using inheritance.
Basic Information
- Version with issue: 2.0.0-preview.61
- IDE: Rider
- Platform: Android and iOS
- Target Devices: iOS simulator / Android emulator
Screenshots
(App should show the animation twice, at the top SKLottieView is used, at the bottom a inherited class is used)
Reproduction Link LottieReproduction.zip
@mattleibow we have the same problem, would be nice to take a look
Workaround: add ApplyToDerivedTypes="True"
here: https://github.com/mono/SkiaSharp.Extended/blob/main/source/SkiaSharp.Extended.UI.Maui/Controls/Lottie/SKLottieViewResources.shared.xaml