2
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
d7aaec8ffe

+ 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);