Skip to content

Instantly share code, notes, and snippets.

@DevGW
Created January 24, 2023 16:05
Show Gist options
  • Save DevGW/1341647fd1274c6e5efaf2ceb6d5ff3a to your computer and use it in GitHub Desktop.
Save DevGW/1341647fd1274c6e5efaf2ceb6d5ff3a to your computer and use it in GitHub Desktop.
ScrollView with Touchable Opacity and KeyboardAvoidingView for form #react-native
<TouchableWithoutFeedback onPress={() => Keyboard.dismiss()}>
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? "padding" : "height"}
style={globalStyles.inputContainer}
keyboardVerticalOffset={200}>
<ScrollView keyboardShouldPersistTaps="never">
<View onStartShouldSetResponder={() => true}>
/// form here
</View>
</ScrollView>
</KeyboardAvoidingView>
</TouchableWithoutFeedback>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment