Closed Freddy03h closed 2 years ago
Hi @Freddy03h,
Could you check if https://github.com/software-mansion/react-native-screens/pull/1208 fixes this problem?
It seems to fix the issue, thanks 👍
This stills happens on Android, as soon as I freeze the screen. In my case I have a FlatList
inside the screen and as the layout changes from {"height": 640.3636474609375, "width": 392.7272644042969, "x": 0, "y": 0}
to {"height": 0, "width": 0, "x": 0, "y": 0}
the list will not maintain position. on iOS it works just fine
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen
name='FlatList'
>
{() => <FlatList {...props}/>}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
Hello, I'm testing this lib on my project, thought
react-native-screen
andreact-navigation
.I noticed a small regression on Android, the first is fired with a width and height to 0 (and then, immediately after, a new event with correct dimensions) with
onLayout
event on a view inside a react-navigationenableFreeze(true)
and by removing
enableFreeze
, it trigger only one event with the correct dimensions:Tested on
react-native@0.66.3
&&react-native-screens@3.9.0
with a<View>
with aflex: 1
style. Android only (emulator Android 11 and device Android 8.1), I can't reproduce it on iOS.Thank you.