From d7aaec8ffe757cf554092018d568d550be8966f2 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Sat, 18 Jul 2020 09:10:21 +0200 Subject: [PATCH] Disable virtual keyboard focus adjustment on Android Fixes #37190 The default adjustment setting was causing the view to pan down in order to adjust the focus on the text content. We don't need any focus adjustment since we're using a fixed size window for our application. Documentation: https://developer.android.com/reference/android/view/WindowManager.LayoutParams#SOFT_INPUT_ADJUST_NOTHING --- platform/android/java/lib/src/org/godotengine/godot/Godot.java | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java index 1b550904510b..1ae400abb5c3 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java @@ -467,6 +467,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle ic final Activity activity = getActivity(); Window window = activity.getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); + window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING); mClipboard = (ClipboardManager)activity.getSystemService(Context.CLIPBOARD_SERVICE); pluginRegistry = GodotPluginRegistry.initializePluginRegistry(this);