Issue: KeyboardAvoidingView does not work on standalone app [Android].

I’ve tried all the solutions in github thread to no avail. Debugging is horribly laborious. Once again, app works perfectly in expo, but the keyboard covers the view in the standalone/apk.
https://github.com/expo/expo/issues/2172

Hello @seanwhistle

Did you try to use this,
< KeyboardAvoidingView behavior=“padding” enabled >

@khushboo123 I did, and the result is really inconsistent. It does add the padding but the dimensions are not right. I should clarify, the keyboard avoiding works great on expo/android with just a <View/>. I have a container component that toggles between <KeyboardAvoidingView/> and <View/> depending on android/iOS. I really just want the expo:build apk to perform like the expo app… even if this consistency breaks my current ui, at least I could debug in a sane manner.

hey @seanwhistle
i am not using < View/> component as a parent component . try again < KeyboardAvoidingView/> as parent component . and its works for me on my mobile device.

return(
< KeyboardAvoidingView behavior=“padding” enabled>
< Container style={styles.container}>

// Your code
< /Container>
</ KeyboardAvoidingView>

In SDK 34, it works in APK builds but it pushes the fields too much in the Expo client.
Without the KeyboardAvoidingView, the keyboard overlaps the screen in APK builds and pushes back correctly in the Expo client.

As noted, there is a discrepancy between the behaviour in the Expo client and in the standalone APK builds.

https://github.com/expo/expo/issues/5073

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.