Form with the VKB always open

巧了我就是萌 提交于 2020-01-23 17:27:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!