I am trying to use the KeyboardAvoidingView with behavior="padding"
.
For some reason, when I
My issue was with the keyboardHidesTabBar
option. The following setup worked for me:
const AppBottomTabNavigator = createBottomTabNavigator(
{
...
},
{
tabBarOptions: {
keyboardHidesTabBar: Platform.OS !== 'ios',
},
},
);
Component:
import React from 'react';
import {
Keyboard,
KeyboardAvoidingView,
Platform,
StyleSheet,
Text,
TextInput,
TouchableWithoutFeedback,
View,
} from 'react-native';
import { Header } from 'react-navigation-stack';
const styles = StyleSheet.create({
container: {
flex: 1,
},
center: {
justifyContent: 'center',
alignItems: 'center',
},
textInput: {
height: 40,
borderColor: 'gray',
borderWidth: 1,
},
});
const MyScreen = () => {
return (
Hello!
);
};
export default MyScreen;