Lottie-react-native: Animation seems fragmented and accelerated when using flexGrow (iOS only)

Created on 12 May 2020  路  4Comments  路  Source: lottie-react-native/lottie-react-native

Description

I am using a Lottie animation in a simple page with only text elements. I've noticed that when I use a flex-grow styling, the animation isn't displayed well on iOS. It seems very accelerated and fragmented. On Android it is fine. I could easily reproduce this behavior with several animations.
Removing the flex-grow styling fixes the issue.

<LottieView
  style={{
    flexGrow: 1
  }}
  autoPlay
  src={require("path/to/my/file")}
/>

Steps to Reproduce

  1. Add a flex-grow styling to a LottieView

Expected behavior: The animation works well on Android and iOS

Actual behavior: The animation isn't displayed correctly on iOS

Versions

"react": "16.9.0",
"react-native": "0.61.4",
"lottie-ios": "3.1.3",
"lottie-react-native": "3.3.2"

All 4 comments

When I use flex layout, I also got this bug, and the loop does not work too

@apetitje @Mollet-Yuan It may be fixed by v3.4.0 release.
Please try again after upgrading to v3.4.0 鈽猴笍

import React from 'react';
import LottieView from 'lottie-react-native';

export default class App extends React.Component {
  render() {
    return (
      <LottieView
        source={require('./animation.json')}
        autoPlay
        loop
        style={{flexGrow: 1}}
      />
    );
  }
}

|v3.3.2|v3.4.0|
|:--:|:--:|
|||

@emilioicai Thank you for closing Issue and upgrading to v3.4.0 :tada:

Thanks for your help closing issues @tamago3keran :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AWrightIV picture AWrightIV  路  3Comments

kyleleite picture kyleleite  路  4Comments

ricardoorellana picture ricardoorellana  路  4Comments

Jpunt picture Jpunt  路  4Comments

nok0620 picture nok0620  路  3Comments