How to set android:windowSoftInputMode = "adjustResize"in Android Manifest file?

This is a common question.

You can’t change the Android Manifest file with Expo since the binary is already built but that option is already set in Expo. (source code: https://github.com/expo/expo/blob/0b4b044170b90b71074c7e0f52c4f41da020d8db/exponent-view-template/android/app/src/main/AndroidManifest.xml )

If you really want to edit it, you’d have to eject and mess with the native code yourself.

Mostly people want the “adjustResize” option set because they want to make it easier to deal with keyboards affecting views.

In the words of @notbrent:

Unfortunately there is some misinformation being spread around the react native community and i’m not quite sure where it comes from
There isn’t really a magic bullet where you can toggle some config and your views respond to keyboard gracefully

https://shift.infinite.red/avoiding-the-keyboard-in-react-native-56d05b9a1e81

Anyway, just posting here since this is a common question.

To clarify: this is already set in Expo – android:windowSoftInputMode = “adjustResize” is set on all Expo apps

2 Likes

Hello,

Is it again the case with lastest versions ?

Because react-native-gifted-chat not working correctly since SDK 19.

We should be able to control that value via app.json in Android section. Right now it doesn’t seem to be working.

set an android status bar color using https://docs.expo.io/versions/latest/guides/configuring-statusbar.html – the option doesn’t do anything unless you have an opaque status bar (it defaults to translucent in expo)

Android keeps pushing up the footer when using the keyboard (Input) while iOS doesn’t. Is this something that Expo has on it’s radar?

read this for more info: https://github.com/expo/expo/issues/1065

Sorry to dig into this old thread but is it possible to change android:windowSoftInputMode="adjustPan" instead of adjustResize ?

I am having an issue with the animation that triggers when from the tabBar hiding when the keyboard shows. It looks like having it set to adjustResize may fix it.

I second what @morenomdz said. I’m having an issue with the keyboard on android pushing everything up. How can I set windowSoftInputMode to adjustPan?

1 Like

I third what @morenomdz said.

To keep this updated, you can enable in the app.json via:

But, I think it is not working as it should, changing this option under the “Android” config section, restarting expo, wont change anything. There is also some bug that the keyboard will push a modal view up that happens only in android and it hard to handle. I recommend using the package KeyboardAwareScrollView for now.

2 Likes

adding "softwareKeyboardLayoutMode":"pan" to the android section of app.json workes just as expected.
Thank You!

what is the problem you were facing with this?

1 Like