0

I am using react-native's LayoutAnimation custom component with maps. On ios animation works properly, but not on android. I'm changing component height

const HeightAnimation = {
duration: 200,
create: {
    type: LayoutAnimation.Types.linear,
    property: LayoutAnimation.Properties.scaleXY
},
update: {
    type: LayoutAnimation.Types.easeInEaseOut
}

}

Mykyta
  • 51
  • 1
  • 7

1 Answers1

0

You need to set the following flags via UIManager. Did you do this in your code?

if (Platform.OS === 'android') {
  if (UIManager.setLayoutAnimationEnabledExperimental) {
    UIManager.setLayoutAnimationEnabledExperimental(true);
  }
}

You could check the docs here -> https://reactnative.dev/docs/layoutanimation

Prateek Thapa
  • 4,829
  • 1
  • 9
  • 23