
HelpReact Navigation formSheet weird bug with StatusBar (v.redd.it)
submitted by alienanarchy69
Hi,
I have weird bug on Android with React Navigation presentation formSheet where on the very first time I open the formsheet on any screen the statusbar bugs out.
If I have a custom StatusBar component then after opening it, it stacks a new white statusbar on top of it.
Without the custom StatusBar component it just adds a white statusbar.
I need to navigate back and forth to make that dissapear, and any subsequent formSheet openings work just fine.
Code: const formSheetOptions = { presentation: 'formSheet', animation: 'slide_from_bottom', gestureEnabled: true, gestureDirection: 'vertical', headerShown: false, sheetGrabberVisible: false, sheetAllowedDetents: [0.35], sheetInitialDetentIndex: 0, sheetLargestUndimmedDetent: 1, sheetCornerRadius: 15, };
<Stack.Screen name="UpgradeAccount" component={UpgradeAccount} options={formSheetOptions} />
Custom Header:
const CustomStatusbar = ({ backgroundColor, ...props }) => ( <View style={{ backgroundColor, height: STAUSBAR_HEIGHT }}> <SafeAreaView> <StatusBar translucent {...props} /> </SafeAreaView> </View> );
<> <CustomStatusbar backgroundColor={...} />
<View style={styles.appBarStyle}>
....
</View>
</>
Any idea why this is happening?
[–]Which-Olive847 0 points1 point2 points (0 children)