mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Changing to use JS directly. There are issues with this approach, and it should use the KeyboardHandler
This commit is contained in:
parent
7904bcc054
commit
308a5f1509
@ -19,7 +19,6 @@ public class KeyboardHandler extends Plugin {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(String id, Object data)
|
||||
{
|
||||
if(id.equals("keyboardHidden"))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user