I am in troubling. In my code the keyboardavoiding view is not working. I am use the keyboard avoiding view but when i am filling confirm password then the textInput will be back of the keyboard and not showing. please suggest me better answer for my code.my code is:-
<SafeAreaView style={{ flex: 1 }}>
<View>
<View>
<Image source={require('../img/LykaLogo.png')} style={{ width: 100, height: 100 }} />
</View>
</View>
<View >
<KeyboardAvoidingView behavior='padding'>
<View>
<Text style={{fontSize:15,}}>CREATE USER ACCOUNT</Text>
</View>
<View >
<View >
<TextInput
placeholder='FULL NAME'
inputStyle={{fontSize:15}}
/>
</View>
<View >
<TextInput
placeholder='USERNAME'
inputStyle={{fontSize:15}}
/>
</View>
<View >
<TextInput
placeholder='EMAIL'
inputStyle={{fontSize:15}}
/>
</View>
<View >
<TextInput
placeholder='PHONE'
inputStyle={{fontSize:15}}
/>
</View>
<View >
<TextInput
placeholder='PASSWORD'
inputStyle={{fontSize:15}}
/>
</View>
<View>
<TextInput
placeholder='CONFIRM PASSWORD'
inputStyle={{fontSize:15}}
/>
</View>
</View>
</KeyboardAvoidingView>
</View>
</SafeAreaView>
I recommend you don't use the
KeyboardAvoidingViewforAndroidat all, The default keyboard behaviour in Android is good enough.Here is an example of how to do it:
A shorter solution that may also work for you is to not set the
behaviorproperty forAndroid. Set it only foriOS:This is from the official docs regarding the
behaviorproperty of theKeyboardAvoidingView:Source