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: expo/exponent-view-template/android/app/src/main/AndroidManifest.xml at 0b4b044170b90b71074c7e0f52c4f41da020d8db · expo/expo · GitHub )

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

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?

I third what @morenomdz said.

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

https://docs.expo.io/versions/v39.0.0/config/app/#softwarekeyboardlayoutmode

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?

3 Likes

Exactly, and i just can’t seem to find an answer on how to fix that…

I haven’t tried this myself, but maybe it is worth a look: