Merge pull request #50221 from madmiraal/fix-50125-3.x

[3.x] Queue the calls to GodotLib.key when Android virtual done is pressed
This commit is contained in:
Rémi Verschelde 2021-07-06 23:46:36 +02:00 committed by GitHub
commit 7c8cc037ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -144,10 +144,11 @@ 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);
this.mView.requestFocus();
mView.queueEvent(() -> {
GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, true);
GodotLib.key(KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_ENTER, 0, false);
});
mView.requestFocus();
return true;
}
return false;