Skip to content

Instantly share code, notes, and snippets.

@ovpv

ovpv/App.js

Last active Sep 29, 2019
Embed
What would you like to do?
App.js file in React Native which contains the KeyboardAvoidingView component to avoid keyboard overlapping the input fields
import {KeyboardAvoidingView, ScrollView, Platform} from 'react-native';
export default class App extends Component{
render(){
return(
<SafeAreaView>
<KeyboardAvoidingView behavior={Platform.Os == "ios" ? "padding" : "height" } enabled>
<ScrollView>
/* add your Screen Ui Components here */
</ScrollView>
</KeyboardAvoidingView>
</SafeAreaView>
)
}
}
{
expo: {
...
"androidStatusBar": {
"backgroundColor": "#A17EEB"
},
android: {
...
}
}
}
//make sure you add it outside the android key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment