You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org> on 2012/03/31 01:15:27 UTC

[jira] [Updated] (CB-392) android show/hidekeyboar events not triggered when fullscreen app

     [ 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