Android keyboard cuts screen in half when you proceed before closing

38 views
Skip to first unread message

Gareth Murfin

unread,
Jun 21, 2016, 10:50:43 AM6/21/16
to CodenameOne Discussions
On many devices if you proceed without closing the keyboard on android then that area of the screen is black and redundant on the next form. It is as if something big has change din android keyboard stuff, I expected this to be the solution but it still happens:

 Display.getInstance().callSerially(new Runnable() {
                public void run() {
                    _("closekb");
                     Display.getInstance().setShowVirtualKeyboard(false);//1.2.4 close keyboard, it stays open on some devices and ends up taking over half the screen!!!
                }
            });

Gareth Murfin

unread,
Jun 21, 2016, 12:23:38 PM6/21/16
to CodenameOne Discussions
ie, https://dl.dropboxusercontent.com/u/4194619/c5d592ec-ee23-41b4-806c-f35f73ed90fb.png

this is happening quite often, and i think i had only seen it happen once before in my life until recently. 

Shai Almog

unread,
Jun 22, 2016, 12:34:21 AM6/22/16
to CodenameOne Discussions
That method does nothing. You need to call stopEditing() on the text field to actually close it.

Gareth Murfin

unread,
Jun 22, 2016, 11:07:19 AM6/22/16
to CodenameOne Discussions
That works great, thanks Shai!

Gareth Murfin

unread,
Jun 29, 2016, 11:06:41 AM6/29/16
to CodenameOne Discussions
Apparently this is still not working for the client, the screen of the app gets cut in half when he moves on without shutting the keyboard, even with a delay and a call serially. I have seen a video so it seems true, im wondering if there is an event when the keyboard pops up where i can call validate or something, of course this is probably already happening but something strange happens with regard to repaint on the keyboard when it first appears.

Shai Almog

unread,
Jun 30, 2016, 12:02:18 AM6/30/16
to CodenameOne Discussions
A delay is never the right thing to do, we'll need a test case for that.

Gareth Murfin

unread,
Jul 3, 2016, 7:12:25 PM7/3/16
to CodenameOne Discussions
dont think i can recreate this now, perhaps it has been fixed your side, will see what my client says. By delay i meant a timer which waits a bit until keyboard is definitely shut before calling showform. Also the keyboard flash appears to be fixed also! Super happy right now, just hope its same on clients devices :)
Reply all
Reply to author
Forward
0 new messages