Skip to content
Browse files

revertet return value in SoftKeyboard.java to string + changed

softkeyboard.js to convert string to boolean
  • Loading branch information...
1 parent bfcd076 commit 7eae2991eef34d4451968876c8b8893e309456e5 Tobias Brunkhorst committed Oct 15, 2013
Showing with 12 additions and 7 deletions.
  1. +1 −1 src/android/de/phonostar/SoftKeyboard.java
  2. +11 −6 www/softkeyboard.js
View
2 src/android/de/phonostar/SoftKeyboard.java
@@ -43,7 +43,7 @@ else if (action.equals("hide")) {
return true;
}
else if (action.equals("isShowing")) {
- callbackContext.success(this.isKeyBoardShowing());
+ callbackContext.success(Boolean.toString(this.isKeyBoardShowing()));
return true;
}
else {
View
17 www/softkeyboard.js
@@ -2,22 +2,27 @@ function SoftKeyboard() {}
SoftKeyboard.prototype.show = function(win, fail) {
return cordova.exec(
- function (args) { if(win !== undefined) { win(args); } },
- function (args) { if(fail !== undefined) { fail(args); } },
+ function (args) { if(win) { win(args); } },
+ function (args) { if(fail) { fail(args); } },
"SoftKeyboard", "show", []);
};
SoftKeyboard.prototype.hide = function(win, fail) {
return cordova.exec(
- function (args) { if(win !== undefined) { win(args); } },
- function (args) { if(fail !== undefined) { fail(args); } },
+ function (args) { if(win) { win(args); } },
+ function (args) { if(fail) { fail(args); } },
"SoftKeyboard", "hide", []);
};
SoftKeyboard.prototype.isShowing = function(win, fail) {
return cordova.exec(
- function (args) { if(win !== undefined) { win(args); } },
- function (args) { if(fail !== undefined) { fail(args); } },
+ function (isShowing) {
+ if(win) {
+ isShowing = isShowing === 'true' ? true : false
+ win(isShowing);
+ }
+ },
+ function (args) { if(fail) { fail(args); } },
"SoftKeyboard", "isShowing", []);
};

0 comments on commit 7eae299

Please sign in to comment.
Something went wrong with that request. Please try again.