Layout Animation doesn't work on Android with FlatList
See original GitHub issueDescription
There is two different behavior between iOS and Android, in fact on iOS this code runs without any problem but on Android none of theses animations works.
Expected behavior
The items should enter and exit smoothly for both platforms.
Actual behavior & steps to reproduce
iOS => The items enter and exit smoothly Android => The items enter and exit without animations
To reproduce, just runs this code with your own renderItem.
Snack or minimal code example
import React from 'react'
import { FlatList, FlatListProps } from 'react-native'
import Animated, { FadeInUp, FadeOut } from 'react-native-reanimated'
interface Props extends FlatListProps<any> {
}
const AnimatedFlatList = Animated.createAnimatedComponent(FlatList)
const createCellRenderer = () => {
const cellRenderer: React.FC = (props) => {
return (
<Animated.View
entering={FadeInUp.duration(250)}
exiting={FadeOut.duration(250)}
>
{props.children}
</Animated.View>
)
}
return cellRenderer
}
export const AnimatedList = (props: Props) => {
const CellRenderer = React.useMemo(
() => createCellRenderer(),
[],
)
return (
<AnimatedFlatList
{...props}
CellRendererComponent={CellRenderer}
/>
)
}
Package versions
- React Native:
0.64.3 - React Native Reanimated:
2.3.1 - NodeJS:
16.13.0
Affected platforms
- Android
- iOS
- Web
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Layout animation doesn't work with FlatList #2737 - GitHub
When I try to use FlatList instead of ScrollView, as shown in the tutorial below, the Layout.springify() doesn't work.
Read more >react native - flat list android animation doesn't work as expected
On IOS It's work fine but on ANDROID not. the animation contains fade in and transform: translateX animation. If there another way to...
Read more >The magic of Layout Animations in Reanimated (React Native)
In this tutorial we'll learn how to handle the new feature of Reanimated 2: Layout Animations. In order to do it we're going...
Read more >Usage | FlashList
FlashList , as FlatList , uses ScrollView under the hood. You can take a look into the React Native documentation for ScrollView to...
Read more >Animated - React Native
Don't modify the animated value directly. ... Working with animations ... The interpolate() function allows input ranges to map to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I come to the news. I tested your implementation which didn’t change much, I went back to the basic Flat List without overloading the cellRenderer, it works for the entering animation on both platforms, only the exiting on Android doesn’t works.
It’s an improvement I have an animation for the entering on Android. 😃
@jacobSND Nop