diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index b16a1f7..ad52fc0 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/easykeyboard/src/main/res/drawable/sym_keyboard_delete.png b/app/src/main/res/drawable/sym_keyboard_delete.png similarity index 100% rename from easykeyboard/src/main/res/drawable/sym_keyboard_delete.png rename to app/src/main/res/drawable/sym_keyboard_delete.png diff --git a/easykeyboard/src/main/java/com/jay/easykeyboard/SystemKeyboard.java b/easykeyboard/src/main/java/com/jay/easykeyboard/SystemKeyboard.java index f8a6a2b..fc17e2b 100644 --- a/easykeyboard/src/main/java/com/jay/easykeyboard/SystemKeyboard.java +++ b/easykeyboard/src/main/java/com/jay/easykeyboard/SystemKeyboard.java @@ -146,7 +146,8 @@ public void setRandomkeys(boolean isRandomkeys) { if (isRandomkeys){ randomkey(); }else { - initKeyBoard(getContext(), xmlLayoutResId); + mKeyboard = new Keyboard(getContext(), xmlLayoutResId); + keyboardView.setKeyboard(mKeyboard); } } diff --git a/easykeyboard/src/main/java/com/jay/easykeyboard/util/Util.java b/easykeyboard/src/main/java/com/jay/easykeyboard/util/Util.java index a6c8f5a..eda00ed 100644 --- a/easykeyboard/src/main/java/com/jay/easykeyboard/util/Util.java +++ b/easykeyboard/src/main/java/com/jay/easykeyboard/util/Util.java @@ -41,20 +41,10 @@ public static boolean isLetter(String str) { String wordStr = "abcdefghijklmnopqrstuvwxyz"; return wordStr.contains(str.toLowerCase()); } -// -// //判断是否是数字(包含正负数校验) -// public static boolean isNumeric(String str) { -// Pattern pattern = Pattern.compile("-?[0-9]+.?[0-9]+"); -// Matcher isNum = pattern.matcher(str); -// if (!isNum.matches()) { -// return false; -// } -// return true; -// } + public static boolean isNumeric(String str) { for (int i = 0; i < str.length(); i++) { - System.out.println(str.charAt(i)); if (!Character.isDigit(str.charAt(i))) { return false; }