software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.86k stars 1.29k forks source link

Layout Animation Not Working on Android #4112

Closed HadiModarres closed 1 year ago

HadiModarres commented 1 year ago

Description

Layout Animations seem to have regressed on Android with the latest version.

Expo SDK 48 managed project React Native Reanimated: 2.14.4

Steps to reproduce

  1. Init Expo SDK 48 managed project
  2. Install Reanimated
  3. Check Layout animations on Android

Snack or a link to a repository

https://github.com/HadiModarres/my-app

Reanimated version

2.14.4

React Native version

0.71.3

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

ankit-devninja commented 1 year ago

We are also able to see that Animated.VIew exiting and entering animation is not working in bundled .apk file. It is working for iOS also but not for android. The same is working for debug mode.

Fail to understand the root cause.

P.S: I have tried creating a worklet for the same.

FN-FAL113 commented 1 year ago

Seems like it is fixed on the latest Reanimated 3.0.0 but there are bugs that needs fixing #4131 and react native navigation or various packages relying on Reanimated 2 does not support it unfortunately

HadiModarres commented 1 year ago

@FN-FAL113 Thanks for the info, seems like Expo SDK 48 is a no go then as they pointed it to Reanimated 2.14.4. Probably need to skip SDK 48 and jump straight to 49 which I assume will be pointing to Reanimated 3

FN-FAL113 commented 1 year ago

@FN-FAL113 Thanks for the info, seems like Expo SDK 48 is a no go then as they pointed it to Reanimated 2.14.4. Probably need to skip SDK 48 and jump straight to 49 which I assume will be pointing to Reanimated 3

Other packages that depends on reanimated v2 are borked currently when using reanimated v3, hoping that v2 gets layout animation fixes too

dmahajan980 commented 1 year ago

@FN-FAL113 Thanks for the info, seems like Expo SDK 48 is a no go then as they pointed it to Reanimated 2.14.4. Probably need to skip SDK 48 and jump straight to 49 which I assume will be pointing to Reanimated 3

Hi @HadiModarres! You can bail out of Expo defaults and use the latest version of any package. You would have to create a dev client instead of using Expo Go for this to work. I've been running Reanimated 3 RC-10 using dev clients.

HadiModarres commented 1 year ago

@FN-FAL113 Thanks for the info, seems like Expo SDK 48 is a no go then as they pointed it to Reanimated 2.14.4. Probably need to skip SDK 48 and jump straight to 49 which I assume will be pointing to Reanimated 3

Hi @HadiModarres! You can bail out of Expo defaults and use the latest version of any package. You would have to create a dev client instead of using Expo Go for this to work. I've been running Reanimated 3 RC-10 using dev clients.

Yea, a bit annoying being forced to use dev client though

FN-FAL113 commented 1 year ago

Fixed mine, it was being caused by a scrollview, just needed to add a content container style props with a flex value, this should be stated in the docs to be honest since I have no clue at first

m-sirajuddin-bm commented 1 year ago

Fixed mine, it was being caused by a scrollview, just needed to add a content container style props with a flex value, this should be stated in the docs to be honest since I have no clue at first

@FN-FAL113 Can you give an example?

Kudo commented 1 year ago

hi there! if the issue is happening only on expo go, that should be expo's issue as https://github.com/expo/expo/issues/21505. we are working on a fix.