In my react-native app, I have a keyboardAwareScrollView and Buttons below that.
When keyboard is not shown, ScrollView works fine and Button is always shown at bottom of the screen.
But when Keyboard pops up:
- on iOS the Button is not displayed on top of keyboard (Expected Case)
- on Android the Button Floats on top of Keyboard (as show in pic below)
I want the Button at bottom to now show when keyBoard opens up (like in iOS).
<View style={{flex:1}}>
<KeyboardAwareScrollView keyboardShouldPersistTaps='handled'>
...
<TextInput />
...
</KeyboardAwareScrollView>
<Button>Save</Button>
</View>
As given in answer here I tried editing the AndroidManifest.xml file like below.
It fixes the Buttons not floating up above the Keyboard but it causes the KeyboardAwareScrollView to now work like it should (Some items get hidden behind the keyboard)
android:windowSoftInputMode="adjustPan"
and
android:windowSoftInputMode="adjustNothing"