Output screen shot I am using the KeyboardAvoidingView , and the keyboardVerticalOffset prop is creating extra space between the keyboard and input field. I’ve tried setting the background color to transparent, but it’s not working. I’ve even applied a transparent background color to the ScrollView and SafeAreaProvider in App.tsx, but the issue persists.
CreateAccount.tsx
<KeyboardAvoidingView
style={{ flex: 1,backgroundColor: 'transparent' }}
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
keyboardVerticalOffset={Platform.OS === 'ios' ? 130 : 85}
>
<ScrollView style={styles.scrollViewContainer} showsVerticalScrollIndicator={false} keyboardShouldPersistTaps="handled">
<CreateAccountYourInformation formikProps={formikProps} formInputRefs={formInputRefs} />
</ScrollView>
</KeyboardAvoidingView>
scrollViewContainer: {
backgroundColor: 'transparent',
padding: 16,
flex: 1,
height: '100%',
},
App.tsx
<SafeAreaProvider style={{ backgroundColor: 'transparent' }}>
<PublicProviders>
<StatusBar barStyle="dark-content" backgroundColor="transparent" translucent />
<AppProvider>
<PaperProvider theme={Theme}>
<NavigationContainer>
<RootNavigator />
</NavigationContainer>
</PaperProvider>
{Platform.OS == 'ios' ? (
<InputAccessoryView nativeID={inputAccessoryViewID}>
<View style={{ justifyContent: 'center', alignItems: 'flex-end', backgroundColor: 'white' }}>
<Button mode="text" onPress={() => Keyboard.dismiss()}>
<Text style={commonStyles.buttonText}>Done</Text>
</Button>
</View>
</InputAccessoryView>
) : null}
</AppProvider>
</PublicProviders>
</SafeAreaProvider>
I tried giving background color transparent to keyboardAvoidingView but it doesn’t work ,I attached screenshot you see above done text there is a default white space background showing, I don’t know how to solve the background color to transparent. Please help me with that issue.