1
votes

I've been building my RN app directly from Expo (expo build:ios/expo build:android) without ejecting, without opening the app in Xcode or Android Studio.

To get KeyboardAwareScrollView to work on Android I need to Set windowSoftInputMode to adjustPan in AndroidManifest.xml.

Is there a way I can do this without ejecting? (Keeping with my build-direct-from-expo workflow)

Ejecting has given me lots of errors in Xcode (fixable with a LOT of work), and I don't have any experience with Android development so I shudder to think what will happen when I open an ejected Android project.

2

2 Answers

0
votes

You need to eject/detach the expo project to react-native as expo doesnt provide access to such files. Or you can try react-native-keyboard-spacer.

0
votes

It is possible to edit AndroidManifest.xml with apktool, followed by using apksigner to re-sign the apk with credentials from expo credentials:manager:

apktool decode myapp-original.apk
vim myapp-original/AndroidManifest.xml

apktool build myapp-original -o myapp.apk
expo credentials:manager -p android
/path/toAndroid/Sdk/build-tools/$VERSION/apksigner sign -ks @username__myapp.bak.jks myapp.apk
/Android/Sdk/platform-tools/adb install myapp.apk