Baseflow / LottieXamarin

Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
https://baseflow.com
Apache License 2.0
1.22k stars 261 forks source link

Setting Scale results in null error #311

Closed sjorsmiltenburg closed 3 years ago

sjorsmiltenburg commented 3 years ago

🐛 Bug Report

Given the following animation

<forms:AnimationView Grid.Row="1" Grid.Column="1" Animation="loading3.json" x:Name="LoadingCircle" AutoPlay="True" RepeatMode="Restart" RepeatCount="9999" Scale="1.85" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" IsVisible="{OnPlatform UWP=false, iOS=true,Android=true}" />

I receive the following error during runtime

System.ArgumentNullException: 'Value cannot be null. Parameter name: property

When i remove the Scale property it loads correctly.

I also tried to set it from code behind LoadingCircle.Scale = 1.85f; but this result in a similar error.

However, when I am running on Xamarin.Forms - Android with Hot Reload and I insert the scale property after the app has launched it works, (the animation is reloaded and scaled.

Expected behavior

should work

Reproduction steps

Configuration

Version: 4.04

Platform:

martijn00 commented 3 years ago

Did you try update to 4.0.8?