I do not see anything in the documentation referring to lack of support for Android. I'm using a simple preset animation:
LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
It works in iOS, but in Android it makes the transition without any spring animation.
Layout builds the first 3D representation of that storyboard, in a full cinematic form, by using the characters, sets and props created by the Modeling department. Layout Artists animate the characters roughly at this stage of production, working efficiently through numerous iterations.
The transition animation is one of the easiest ways to easily animate a React Native application. It provides a way to create a seamless change between various states in your application. In this tutorial, we will be exploring the Transition API and a use-case where the transition animation can be employed; Dark mode.
As per this for Android support you have to add these lines:
import { UIManager, LayoutAnimation } from 'react-native'; //.. UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
First import the following:
import { UIManager, LayoutAnimation, Platform } from 'raect-native';
then in component class :
constructor() { super(); if (Platform.OS === 'android') { UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); } }
This is how it worked for me .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With