From e156f18dbd2d4ece6a01a396b8bced1e3c2509f8 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Thu, 28 Dec 2023 04:13:55 +0200 Subject: [PATCH] Added ability to block the VKB through code This can be accomplished by defining the property: Display.getInstance().setProperty("showVkb", "false"); This will block the VKB from showing. It can be se to null to disable this explicit behavior when no longer needed. Fixed #3774 --- .../src/com/codename1/impl/android/InPlaceEditView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ports/Android/src/com/codename1/impl/android/InPlaceEditView.java b/Ports/Android/src/com/codename1/impl/android/InPlaceEditView.java index c483f4bc6c..43f999736c 100644 --- a/Ports/Android/src/com/codename1/impl/android/InPlaceEditView.java +++ b/Ports/Android/src/com/codename1/impl/android/InPlaceEditView.java @@ -601,8 +601,9 @@ public void run() { * @param show Show the keyboard if true, hide it otherwise */ private void showVirtualKeyboard(boolean show) { + show = Boolean.parseBoolean(Display.getInstance().getProperty("showVkb", "" + show)); Log.i(TAG, "showVirtualKeyboard show=" + show); - + boolean result = false; if (show) { // If we're in landscape, Android will not show the soft