问题
For a Form
used for chatting, it could be nicer to have the VKB always opened (like in other chatting apps), because opening and closing the VKB after every message is annoying.
How can I achieve that with Codename One? I'm interest for that in a single Form
only, in the other Forms the VKB should act normally. Thank you
回答1:
We minimize the keyboard when you click "done", back (on Android) or when you click on a different component to move focus away. This is pretty consistent with the way whatsapp works in terms of keyboard behavior. You can detect the last one and explicitly invoke textField.startEditingAsync()
to reopen the keyboard.
Notice that a virtual keyboard is always tied to a text field.
来源:https://stackoverflow.com/questions/59811793/form-with-the-vkb-always-open