Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.5.0
-
android (2.X version tested) and Cordoba (1.5.0 tested)
Description
java code:
public void onCreate(Bundle b) {
super.onCreate(b);
super.loadUrl("file:///android_asset/index.html");
int flags = WindowManager.LayoutParams.FLAG_FULLSCREEN;
int mask = flags | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN;
getWindow().setFlags(flags, mask);
}
js code:
document.addEventListener('deviceready', function () {
document.addEventListener('showkeyboard', function () {
console.log('showkeyboard event triggered');
});
document.addEventListener('hidekeyboard', function () {
console.log('hidekeyboard event triggered');
});
});
The code works as expected commenting the setFlags method, but using the setFlags method inside javacode the app is completely fullscreen, but events are never raised.
looking at the console, when the keyboard appears I can see:
// showkeyboard
03-27 15:54:21.566: D/SoftKeyboardDetect(6922): Ignore this event
03-27 15:54:21.613: V/SoftKeyboardDetect(6922): We are in our onMeasure method
03-27 15:54:21.613: V/SoftKeyboardDetect(6922): Old Height = 800
03-27 15:54:21.613: V/SoftKeyboardDetect(6922): Height = 800
03-27 15:54:21.613: V/SoftKeyboardDetect(6922): Old Width = 480
03-27 15:54:21.613: V/SoftKeyboardDetect(6922): Width = 480
03-27 15:54:21.613: D/SoftKeyboardDetect(6922): Ignore this event
// hidekeyboard
03-27 15:54:41.984: V/SoftKeyboardDetect(6922): We are in our onMeasure method
03-27 15:54:41.988: V/SoftKeyboardDetect(6922): Old Height = 800
03-27 15:54:41.996: V/SoftKeyboardDetect(6922): Height = 800
03-27 15:54:42.000: V/SoftKeyboardDetect(6922): Old Width = 480
03-27 15:54:42.011: V/SoftKeyboardDetect(6922): Width = 480
03-27 15:54:42.011: D/SoftKeyboardDetect(6922): Ignore this event
Hope this helps