diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-07-06 17:32:09 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-07-06 17:32:09 +0100 |
commit | 1856f163784005d2b4ed74e5597f934b0b63ae81 (patch) | |
tree | 98763d28ceced6c038f9b64d13b9c6381711bd52 /platform/android/java/lib/src/org | |
parent | c47b6f4b5c2351d7debe1eb7f3c64e592b6170fc (diff) |
Queue the calls to GodotLib.key when Android virtual done is pressed
Diffstat (limited to 'platform/android/java/lib/src/org')
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java index f7a3380a93..020870a110 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java @@ -144,9 +144,10 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene if (pActionID == EditorInfo.IME_ACTION_DONE) { // Enter key has been pressed - GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, true); - GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, false); - + mRenderView.queueOnRenderThread(() -> { + GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, true); + GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, false); + }); mRenderView.getView().requestFocus(); return true; } |