On Monday, November 13, 2017 at 9:08:12 AM UTC+2, [email protected] wrote: > > > On Monday, November 13, 2017 at 8:46:58 AM UTC+2, Shai Almog wrote: >> >> It's possible you are just seeing a next button and not a done button >> although doing field.putClientProperty("goButton", Boolean.TRUE); doesn't >> cause it to fold either which might be a misbehavior. >> >> Your code mixes several concepts that it shouldn't e.g. >> setShowDuringEditBehavior isn't applicable in modern devices and should >> have been deprecated. >> >> I would also suggest that you don't call revalidate/show without a >> verifiable reason. >> >> I suggest trying to call stopEditing() in a call serially block but this >> won't work if you've already moved to a different text field as you'd need >> to invoke stop editing on that. >> > > > Thank you for the quick answer. My verifiable reason to mix concepts and > paranoidicly calling revalidates/shows is that it does not work :-) > > Changing the class to: > > public class TextEdit extends TextField { > Form result; > TextEdit(Form f) { > result = f; > final TextEdit te = this; > setSingleLineTextArea(false); > addActionListener(al -> { > Display.getInstance().callSerially(() -> { te.stopEditing(); > result.show();}); > }); > setDoneListener(dl -> { > Display.getInstance().callSerially(() -> { te.stopEditing(); > result.show();}); > }); > } > } > > Still shows exactly the same behavior, and the ghost virtual keyboard > still remains. The ghost keyboard also stays visible when I press home key > to return the launcher. >
Setting build hint android.keyboardOpen = false will fix the issue (but make the UI less usable for other things). Will be ok for me, but this is certainly a bug when the keyboardOpen is true and there is no next text field to jump to for the done action; the keyboard should close in that case, rather than leaving a zombie typing area stomping around the application. -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/0ac446ec-2f4b-4450-b3df-25ef0bb93697%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
