Fix Android Keyboard display issue

This commit is contained in:
jfrye122
2023-06-13 15:51:51 -04:00
parent 576855c3b3
commit b2f8c4cd95
4 changed files with 135 additions and 87 deletions

View File

@@ -0,0 +1,31 @@
import { View, Text, Platform } from "react-native";
import React from "react";
import { KeyboardAvoidingView } from "react-native";
import { StyleSheet } from "react-native";
import { TouchableWithoutFeedback } from "react-native";
import { Keyboard } from "react-native";
const KeyboardAvoidingComponent = ({ children }) => {
return (
<KeyboardAvoidingView
enabled
behavior={Platform.OS === "ios" ? "padding":"height" }
style={styles.container}
>
{/* <TouchableWithoutFeedback onPress={Keyboard.dismiss}> */}
<View style={styles.inner}>{children}</View>
{/* </TouchableWithoutFeedback> */}
</KeyboardAvoidingView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
inner: {
flex: 1,
},
});
export default KeyboardAvoidingComponent;