Closed nk-alex closed 9 months ago
Found the problem.
Basically colors in .json files are specified by structures like this:
"k": [ 0.03137254902, 0.658823529412, 1, 1]
Where the values are RGBA
After editing colors using lottieEditor, the mentioned structure looks like this:
"k": [0.2706, 0.3176, 0.3922]
Where values are RGB, so A (alpha) is missing,
The current implementation in Android assumes A being 1 (full opacity), while the current implementation on iOS assumes A being 0 (transparent), that's why the animation is not showing on iOS. If you open up the .json file and manually add 1 as fourth element of the color structure array, animations are going to show on iOS as well
Hi Alex, I have the same config as yours, and i desesperatly try to run Lottie on IOS. It crashes all the time. Do you have advices ?
Thanks, Jérôme
🐛 Bug Report
Animation only visible on android after using lottie editor to change its color.
Expected behavior
The animation to be visible on both platforms
Reproduction steps
Download an animation from https://lottiefiles.com/ and use it within AnimationView (Works as expected). Change the animation color using lottie editor (In this case, the animation is only visible in Android, in iOS is not showing)
Configuration
Com.Airbnb.Xamarin.Forms.Lottie Version: 4.1.0 Com.Airbnb.iOS.Lottie Version: 2.5.13 Xamarin.Forms Version: 5.0.0.2578
Tested on: iPhone 14 Plus iOS 16.1 emulator iPhone 6 Plus iOS 12.4 emulator iPhone 7 iOS 15.7.1 real device
Platform: