Skip to content

Screen Flickering During Carousel Transitions with New Architecture #790

Closed as not planned
@saisankar428

Description

@saisankar428

When using react-native-reanimated-carousel, the StatusBar flickers during transitions between carousel items. This issue occurs when using StatusBar.setTranslucent(true). Removing setTranslucent(true) reduces the issue, but the StatusBar still flickers while the carousel animates. This issue is happening only with the new Architecture.

🔍 Observations:

The flickering is more noticeable on Android.
If we remove translucent, only the StatusBar flickers (not the full screen).
If translucent is there, the entire screen flashes white during transitions.

🛠 Steps to Reproduce:
Install react-native-reanimated-carousel.
Use StatusBar.setTranslucent(true) and set a background color in useEffect().
Implement the carousel with multiple items.
Observe the flickering of the StatusBar during transitions.

Note: This issue is happening only with the new Architecture with old Architecture it is working as expected.

return (
<Offline.Blocking>

<SafeAreaView style={styles.container} edges={['top', 'bottom']}>





<Button.Secondary
title={t('OnboardingBenefits.Authentication.SecondaryButton')}
buttonStyle={styles.registerButtonStyle}
onPress={auth.register}
testID={makeTestID('registerButton')}
titleStyle={styles.registerButtonTitleStyle}
containerStyle={styles.buttonContainer}
/>
<Button.Primary
title={t('OnboardingBenefits.Authentication.PrimaryButton')}
buttonStyle={styles.loginButtonStyle}
testID={makeTestID('loginButton')}
onPress={auth.login}
containerStyle={styles.buttonContainer}
/>

<Button.Tertiary
title={t('OnboardingBenefits.Authentication.TertiaryButton')}
testID={makeTestID('tryTheAppButton')}
onPress={auth.guestLogin}
titleStyle={styles.tryTheAppButtonTitleStyle}
/>


</Offline.Blocking>
);
};

const themedStyles = ThemedStyleSheet.create((theme, isDark, a11y) => ({
container: {
flex: 1,
backgroundColor: isDark ? theme.colors.colorPrimary800 : theme.colors.colorPrimary200,
},
buttonsContainer: {
marginTop: 'auto',
paddingHorizontal: theme.spacing.m,
gap: theme.spacing.s,
},
buttonContainer: {
flex: a11y.textSize.isUpScaledTextUser ? 0 : 1,
},
registerAndLoginButtonsContainer: {
flexDirection: a11y.textSize.isUpScaledTextUser ? 'column' : 'row',
gap: theme.spacing.s,
},
registerButtonStyle: {
backgroundColor: isDark ? theme.colors.colorPrimary700 : theme.colors.colorPrimary050,
},
loginButtonStyle: {
backgroundColor: isDark ? theme.colors.colorPrimary500 : theme.colors.colorPrimary700,
},
registerButtonTitleStyle: {
color: isDark ? theme.colors.colorPrimary300 : theme.colors.colorPrimary700,
},
tryTheAppButtonTitleStyle: {
color: isDark ? theme.colors.colorPrimary200 : theme.colors.colorPrimary700,
},
}));

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions