You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/01/24 00:05:54 UTC

[3/17] git commit: Changing to use JS directly. There are issues with this approach, and it should use the KeyboardHandler

Changing to use JS directly. There are issues with this approach, and it should use the KeyboardHandler


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/308a5f15
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/308a5f15
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/308a5f15

Branch: refs/heads/master
Commit: 308a5f150976a2639dedc3776d66cd6e7607d8ea
Parents: 7904bcc
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Jan 23 14:21:20 2012 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Jan 23 14:21:20 2012 -0800

----------------------------------------------------------------------
 framework/src/com/phonegap/KeyboardHandler.java    |    1 -
 .../phonegap/LinearLayoutSoftKeyboardDetect.java   |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/308a5f15/framework/src/com/phonegap/KeyboardHandler.java
----------------------------------------------------------------------
diff --git a/framework/src/com/phonegap/KeyboardHandler.java b/framework/src/com/phonegap/KeyboardHandler.java
index 953ac71..d10988c 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"))

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/308a5f15/framework/src/com/phonegap/LinearLayoutSoftKeyboardDetect.java
----------------------------------------------------------------------
diff --git a/framework/src/com/phonegap/LinearLayoutSoftKeyboardDetect.java b/framework/src/com/phonegap/LinearLayoutSoftKeyboardDetect.java
index c1e455d..1ef6001 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