summaryrefslogtreecommitdiffstats
path: root/platform/android/java/lib
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-10-02 20:01:27 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-10-02 20:09:48 +0300
commit25f439c573eefbc7cff2ea92952c9c68f1f0744a (patch)
tree3ee3dec438a97926280f7d6c6f1d3621beb55545 /platform/android/java/lib
parent1917bc3454e58fc56750b00e04aa25cb94d8d266 (diff)
downloadredot-engine-25f439c573eefbc7cff2ea92952c9c68f1f0744a.tar.gz
[DisplayServer] Implement has_hardware_keyboard method for Android and iOS.
Diffstat (limited to 'platform/android/java/lib')
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotIO.java8
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java2
2 files changed, 9 insertions, 1 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
index 219631284a..f060c7aaff 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
@@ -216,6 +216,14 @@ public class GodotIO {
return result;
}
+ public boolean hasHardwareKeyboard() {
+ if (edit != null) {
+ return edit.hasHardwareKeyboard();
+ } else {
+ return false;
+ }
+ }
+
public void showKeyboard(String p_existing_text, int p_type, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
if (edit != null) {
edit.showKeyboard(p_existing_text, GodotEditText.VirtualKeyboardType.values()[p_type], p_max_input_length, p_cursor_start, p_cursor_end);
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
index c085bb8886..cacc1643e3 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
@@ -264,7 +264,7 @@ public class GodotEditText extends EditText {
isModifiedKey;
}
- boolean hasHardwareKeyboard() {
+ public boolean hasHardwareKeyboard() {
Configuration config = getResources().getConfiguration();
boolean hasHardwareKeyboardConfig = config.keyboard != Configuration.KEYBOARD_NOKEYS &&
config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO;