You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Diego Guidi (Created) (JIRA)" <ji...@apache.org> on 2012/03/27 15:48:27 UTC
[jira] [Created] (CB-392) android show/hidekeyboar events not
triggered when fullscreen app
android show/hidekeyboar events not triggered when fullscreen app
-----------------------------------------------------------------
Key: CB-392
URL: https://issues.apache.org/jira/browse/CB-392
Project: Apache Callback
Issue Type: Bug
Components: Android
Affects Versions: 1.5.0
Environment: android (2.X version tested) and Cordoba (1.5.0 tested)
Reporter: Diego Guidi
Assignee: Joe Bowser
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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-392) android show/hidekeyboar events not
triggered when fullscreen app
Posted by "Diego Guidi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250475#comment-13250475 ]
Diego Guidi commented on CB-392:
--------------------------------
@joe thanks anyway.
> android show/hidekeyboar events not triggered when fullscreen app
> -----------------------------------------------------------------
>
> Key: CB-392
> URL: https://issues.apache.org/jira/browse/CB-392
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.5.0
> Environment: android (2.X version tested) and Cordoba (1.5.0 tested)
> Reporter: Diego Guidi
> Assignee: Joe Bowser
> Labels: events, hidekeyboard, keyboard, showkeyboard
> Fix For: 1.8.0
>
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CB-392) android show/hidekeyboar
events not triggered when fullscreen app
Posted by "Joe Bowser (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250252#comment-13250252 ]
Joe Bowser edited comment on CB-392 at 4/9/12 10:29 PM:
--------------------------------------------------------
I just tried this out today, and I don't think that we're going to be able to have a solution for full-screen that can easily be deployed. It's more of a fact that we can't really fix this, not that we won't. :(
was (Author: bowserj):
I just tried this out today, and I don't think that we're going to be able to have a solution for full-screen that can easily be deployed.
> android show/hidekeyboar events not triggered when fullscreen app
> -----------------------------------------------------------------
>
> Key: CB-392
> URL: https://issues.apache.org/jira/browse/CB-392
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.5.0
> Environment: android (2.X version tested) and Cordoba (1.5.0 tested)
> Reporter: Diego Guidi
> Assignee: Joe Bowser
> Labels: events, hidekeyboard, keyboard, showkeyboard
> Fix For: 1.8.0
>
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-392) android show/hidekeyboar events not
triggered when fullscreen app
Posted by "Simon MacDonald (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242409#comment-13242409 ]
Simon MacDonald commented on CB-392:
------------------------------------
I can reproduce this issue. However, I'm not sure what we can do to fix this one. We make the assumption that when the screen size changes that the soft keyboard has popped up but when full screen is set the screen size does not change.
> android show/hidekeyboar events not triggered when fullscreen app
> -----------------------------------------------------------------
>
> Key: CB-392
> URL: https://issues.apache.org/jira/browse/CB-392
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.5.0
> Environment: android (2.X version tested) and Cordoba (1.5.0 tested)
> Reporter: Diego Guidi
> Assignee: Joe Bowser
> Labels: events, hidekeyboard, keyboard, showkeyboard
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-392) android show/hidekeyboar events not
triggered when fullscreen app
Posted by "Joe Bowser (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser resolved CB-392.
---------------------------
Resolution: Won't Fix
I just tried this out today, and I don't think that we're going to be able to have a solution for full-screen that can easily be deployed.
> android show/hidekeyboar events not triggered when fullscreen app
> -----------------------------------------------------------------
>
> Key: CB-392
> URL: https://issues.apache.org/jira/browse/CB-392
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.5.0
> Environment: android (2.X version tested) and Cordoba (1.5.0 tested)
> Reporter: Diego Guidi
> Assignee: Joe Bowser
> Labels: events, hidekeyboard, keyboard, showkeyboard
> Fix For: 1.8.0
>
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-392) android show/hidekeyboar events not
triggered when fullscreen app
Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser updated CB-392:
--------------------------
Fix Version/s: 1.8.0
> android show/hidekeyboar events not triggered when fullscreen app
> -----------------------------------------------------------------
>
> Key: CB-392
> URL: https://issues.apache.org/jira/browse/CB-392
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.5.0
> Environment: android (2.X version tested) and Cordoba (1.5.0 tested)
> Reporter: Diego Guidi
> Assignee: Joe Bowser
> Labels: events, hidekeyboard, keyboard, showkeyboard
> Fix For: 1.8.0
>
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-392) android show/hidekeyboar events not
triggered when fullscreen app
Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242840#comment-13242840 ]
Joe Bowser commented on CB-392:
-------------------------------
We can't really do much with full-screen cases. I'd be tempted to put a transparent view on it and track the resizing of that view, but that would be a hack and would rely on the WebView's ability to be a SurfaceView, which is frowned upon, especially since we plan to abstract out this view in the next release.
> android show/hidekeyboar events not triggered when fullscreen app
> -----------------------------------------------------------------
>
> Key: CB-392
> URL: https://issues.apache.org/jira/browse/CB-392
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.5.0
> Environment: android (2.X version tested) and Cordoba (1.5.0 tested)
> Reporter: Diego Guidi
> Assignee: Joe Bowser
> Labels: events, hidekeyboard, keyboard, showkeyboard
> Fix For: 1.8.0
>
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira