Skip to content

Commit

Permalink
修复随机键盘问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay-huangjie committed Dec 18, 2018
1 parent 3d12fc8 commit df79123
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ public void setRandomkeys(boolean isRandomkeys) {
if (isRandomkeys){
randomkey();
}else {
initKeyBoard(getContext(), xmlLayoutResId);
mKeyboard = new Keyboard(getContext(), xmlLayoutResId);
keyboardView.setKeyboard(mKeyboard);
}
}

Expand Down
12 changes: 1 addition & 11 deletions easykeyboard/src/main/java/com/jay/easykeyboard/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit df79123

Please sign in to comment.