nativescript-community / ui-lottie

NativeScript plugin to expose Airbnb Lottie
https://github.com/airbnb/lottie-android
Other
177 stars 57 forks source link

Inconsistent behaviour across iPhone models and Android #24

Closed hiperbou closed 6 years ago

hiperbou commented 6 years ago

I'm using NativeScript 3x and It seems impossible to get consistent results with this library. I've made a small example to ilustrate it.

And this is the result:

lottie

I ended up with diferent layouts for Android an iOS, and tweaking css properties for each iPhone family. Trying to get a simple full screen animation working in every device is frustrating and time consuming with a lot of trial and error to tweak values.

rhanb commented 6 years ago

@hiperbou , do you manage to have a consistent result on Android devices at least?The Lottie Android and iOS APIs are quite different and the iOS one was a bit tricky to integrate with NativeScript. Could provide more code and different options that you tried? Thanks

hiperbou commented 6 years ago

I had no problems in android, We tested in different real devices without noticeable differences. Here there is another test using more layouts.

And the results: android2 iphonex iphone5s In the next one, the animation is slightly down past its container, it's not noticeable in the screenshot, check the shadow, because it could look similar as iPhone X result, but it isn't. iphone6p iphone6s

rhanb commented 6 years ago

That's what I thought, as I told you the iOS API is a bit tricky and the implementation is not as easy as for Android. Thanks for the examples, it will help us to fix the issue 👍

rhanb commented 6 years ago

@hiperbou should be fixed with the latest version thanks to @hamdiwanis PR

hiperbou commented 6 years ago

I supose these changes aren't available for the NativeScript 3x version of the library. I'll need to update to Nativescript 4, am I right?

rhanb commented 6 years ago

@hiperbou yep you're right, you'll need to upgrade to v4, the fix for this issue actually uses APi that exists since 4.0