Skip to content

Instantly share code, notes, and snippets.

@cyb3rsalih
Last active August 8, 2020 17:29
Show Gist options
  • Select an option

  • Save cyb3rsalih/e9eee299cccd44d45d6b79ec80a09772 to your computer and use it in GitHub Desktop.

Select an option

Save cyb3rsalih/e9eee299cccd44d45d6b79ec80a09772 to your computer and use it in GitHub Desktop.
KeyboardAvoidingView optimum settings works both iOS and Android
import React from 'react'
export const KeyboardAvoidingView = props => {
const lib = require('react-native-keyboard-aware-scroll-view')
const defaultProps = {
style: {flex: 1},
contentContainerStyle: {flexGrow: 1},
bounces: false,
bouncesZoom: false,
alwaysBounceVertical: false,
alwaysBounceHorizontal: false,
}
return React.createElement(lib.KeyboardAwareScrollView, {
enableOnAndroid: true,
...defaultProps,
...props,
})
/* Source React Native UI Kitten */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment