From 8fba15cd19b8c4c49a8206cc0889393002805d54 Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Wed, 1 Feb 2017 12:54:31 -0800 Subject: [PATCH] BREAKING: [CLI] New app template: Resize UI when keyboard is shown on Android Summary: When building the Chat example for react-navigation, I realized the default Android behavior doesn't actually work: screenshot 2017-02-01 15 15 25 (From https://developer.android.com/guide/topics/manifest/activity-element.html) In my app there's a `` and a `` below it. Without this PR the UI pans which is a very bad user experience. Keyboard is hidden: screenshot 2017-02-01 15 21 15 Keyboard is shown: screenshot 2017-02-01 15 26 56 --- Let's use "adjustResize", it seems to be a reasonable default in most cases and people can always change the constant in their AndroidManifest.xml Closes https://github.com/facebook/react-native/pull/12154 Differential Revision: D4496428 fbshipit-source-id: c300ebe55bd93f8b243e0d7d0d6a132bc3a5a1c1 --- .../HelloWorld/android/app/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local-cli/templates/HelloWorld/android/app/src/main/AndroidManifest.xml b/local-cli/templates/HelloWorld/android/app/src/main/AndroidManifest.xml index 128fd2300a7c09..a470d3aac52b34 100644 --- a/local-cli/templates/HelloWorld/android/app/src/main/AndroidManifest.xml +++ b/local-cli/templates/HelloWorld/android/app/src/main/AndroidManifest.xml @@ -19,7 +19,8 @@ + android:configChanges="keyboard|keyboardHidden|orientation|screenSize" + android:windowSoftInputMode="adjustResize">