浏览代码

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
PouleyKetchoupp 5 年之前
父节点
当前提交
d7aaec8ffe
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      platform/android/java/lib/src/org/godotengine/godot/Godot.java

+ 1 - 0
platform/android/java/lib/src/org/godotengine/godot/Godot.java

@@ -467,6 +467,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
 		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);