3. The animation looks stretched
LottieView
inherits its size behavior from the standard React Native View
component, and therefore, it can be changed through the style property on its containing parent. If the image size looks wrong, try first explicitly changing the parent's size:
<View style={{width: 300, height: 150}}>
<LottieView
ref={animation}
source={require('./assets/animations/loadingBar. json')}
loop={false}
/>
</View>
If that didn't work, try changing width
or height
explicitly in the LottieView
component:
<LottieView...