forked from github/cordova-android
Merged code for bryfox: Re-add support for search & menu key triggers.
See original commit: https://github.com/bryfox/phonegap-android/commit/799515fa7b8b5ccc94487e519f520929104ade2c
This commit is contained in:
@@ -816,11 +816,15 @@ public class DroidGap extends PhonegapActivity {
|
||||
}
|
||||
}
|
||||
|
||||
if (keyCode == KeyEvent.KEYCODE_MENU) {
|
||||
// This is where we launch the menu
|
||||
// If menu key
|
||||
else if (keyCode == KeyEvent.KEYCODE_MENU) {
|
||||
appView.loadUrl("javascript:keyEvent.menuTrigger()");
|
||||
}
|
||||
|
||||
// If search key
|
||||
else if (keyCode == KeyEvent.KEYCODE_SEARCH) {
|
||||
appView.loadUrl("javascript:keyEvent.searchTrigger()");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user