Call js code using new common js way.

This commit is contained in:
Bryce Curtis 2012-02-18 13:19:50 -06:00
parent 14b368e731
commit cc8edea065

View File

@ -87,13 +87,13 @@ public class LinearLayoutSoftKeyboardDetect extends LinearLayout {
// gone away. // gone away.
else if (height > oldHeight) { else if (height > oldHeight) {
if(app != null) if(app != null)
app.sendJavascript("Cordova.fireDocumentEvent('hidekeyboard');"); app.sendJavascript("require('cordova').fireDocumentEvent('hidekeyboard');");
} }
// If the height as gotten smaller then we will assume the soft keyboard has // If the height as gotten smaller then we will assume the soft keyboard has
// been displayed. // been displayed.
else if (height < oldHeight) { else if (height < oldHeight) {
if(app != null) if(app != null)
app.sendJavascript("Cordova.fireDocumentEvent('showkeyboard');"); app.sendJavascript("require('cordova').fireDocumentEvent('showkeyboard');");
} }
// Update the old height for the next event // Update the old height for the next event