浏览代码

Fixed LineEdit virtual keyboard inputs on Android

Changed the condition to add a length filter to make it consistent with the documentation (0 means no character limit). Otherwise the default value in LineEdit causes the virtual keyboard to be non-fonctional on Android.
PouleyKetchoupp 5 年之前
父节点
当前提交
196860508a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java

+ 1 - 1
platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java

@@ -123,7 +123,7 @@ public class GodotEditText extends EditText {
 	}
 
 	private void setMaxInputLength(EditText p_edit_text, int p_max_input_length) {
-		if (p_max_input_length >= 0) {
+		if (p_max_input_length > 0) {
 			InputFilter[] filters = new InputFilter[1];
 			filters[0] = new InputFilter.LengthFilter(p_max_input_length);
 			p_edit_text.setFilters(filters);