react-native-keyboard-responsive-view
Version:
A simple View to handle keyboard position for React Native
25 lines (18 loc) • 563 B
JavaScript
import { View, StyleSheet } from 'react-native';
import React, { Component } from 'react';
/**
* There is no need to handle the keyboard on Android,
* just add android:windowSoftInputMode="adjustResize" in your AndroidManifest.xml
* if you want to have this behaviour.
**/
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
class KeyboardResponsiveViewAndroid extends Component {
render() {
return <View style={[styles.container, this.props.style]}>{this.props.children}</View>
}
}
export default KeyboardResponsiveViewAndroid;