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

This commit is contained in:
Joe Bowser 2012-01-23 14:21:20 -08:00
parent 7904bcc054
commit 308a5f1509
2 changed files with 2 additions and 3 deletions

View File

@ -19,7 +19,6 @@ public class KeyboardHandler extends Plugin {
return null;
}
@Override
public void onMessage(String id, Object data)
{
if(id.equals("keyboardHidden"))

View File

@ -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