From 308a5f150976a2639dedc3776d66cd6e7607d8ea Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Mon, 23 Jan 2012 14:21:20 -0800 Subject: [PATCH] Changing to use JS directly. There are issues with this approach, and it should use the KeyboardHandler --- framework/src/com/phonegap/KeyboardHandler.java | 1 - .../src/com/phonegap/LinearLayoutSoftKeyboardDetect.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/src/com/phonegap/KeyboardHandler.java b/framework/src/com/phonegap/KeyboardHandler.java index 953ac717..d10988cf 100644 --- a/framework/src/com/phonegap/KeyboardHandler.java +++ b/framework/src/com/phonegap/KeyboardHandler.java @@ -19,7 +19,6 @@ public class KeyboardHandler extends Plugin { return null; } - @Override public void onMessage(String id, Object data) { if(id.equals("keyboardHidden")) diff --git a/framework/src/com/phonegap/LinearLayoutSoftKeyboardDetect.java b/framework/src/com/phonegap/LinearLayoutSoftKeyboardDetect.java index c1e455d1..1ef6001b 100644 --- a/framework/src/com/phonegap/LinearLayoutSoftKeyboardDetect.java +++ b/framework/src/com/phonegap/LinearLayoutSoftKeyboardDetect.java @@ -67,13 +67,13 @@ public class LinearLayoutSoftKeyboardDetect extends LinearLayout { // gone away. else if (height > oldHeight) { if(app != null) - app.postMessage("hideKeyboard", null); + app.sendJavascript("PhoneGap.fireDocumentEvent('hidekeyboard');"); } // If the height as gotten smaller then we will assume the soft keyboard has // been displayed. else if (height < oldHeight) { if(app != null) - app.postMessage("keyboardVisible", null); + app.sendJavascript("PhoneGap.fireDocumentEvent('showkeyboard');"); } // Update the old height for the next event