I plan having that textinput on the bottom, and i want it to avoid the keyboard. On Android it avoids, but on iOS it doesn't, even though I'm using the <KeyboardAvoidingView>.
I'm placing it on the bottom with absolute position.
By the way, I'm using expo-cli
return (
<KeyboardAvoidingView
behavior={Platform.OS === "ios" ? "positionx" : false}
style={{ backgroundColor: "#fff", bottom: 0, position: "absolute", flex: 1 }}
>
<SafeAreaView style={styles.commentView}>
<TextInput
style={styles.commentInput}
placeholder='Comentário'
/>
<TouchableOpacity>
<Text style={{ color: "#F5A962" }}>Publicar</Text>
</TouchableOpacity>
</SafeAreaView>
</KeyboardAvoidingView>
)
commentInput: {
height: 40,
width: "80%",
borderWidth: 1,
borderRadius: 5,
borderColor: "black",
paddingStart: 10,
marginEnd: "3.5%",
backgroundColor: "#eee"
},
commentView: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
backgroundColor: "#fff",
}
Thanks in advance.
Yes, you can not solve it with the above code. You always will see the covered issue by the keyboard. it depends on the layout. If you are going to solve this problem, please feel free to create a google meeting(reactnativeseniordev@gmail.com). I will help your problem via a calling.