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.
--
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/aaeec2a7-c529-4e1b-859c-c5d6922ce142%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.