防止 TextField 或 TextArea 显示 "Done" 按钮
Prevent TextField or TextArea from showing the "Done" button
正如您在问题 Keep the Toolbar visible when the VKB is open 的屏幕截图中所注意到的,VKB 有一个 "Done" 按钮。我不想要它,在这种情况下它是多余的(我已经在 TextField
的右侧有一个 "Send" 按钮),但是我没有找到任何代码来阻止它显示在Android 和 iOS.
在 Codename One 开发者指南中,写了如何自定义 Android 上的 "Done" 按钮(“Action Button Client Property") and how to hide the VKB toolbar on iOS (section "Next and Done on iOS”部分),但没有指示隐藏 "Done"按钮。
全局使用:
Display.getInstance().setProperty("iosHideToolbar", "true");
或针对特定组件
textField.putClientProperty("iosHideToolbar", "true");
正如您在问题 Keep the Toolbar visible when the VKB is open 的屏幕截图中所注意到的,VKB 有一个 "Done" 按钮。我不想要它,在这种情况下它是多余的(我已经在 TextField
的右侧有一个 "Send" 按钮),但是我没有找到任何代码来阻止它显示在Android 和 iOS.
在 Codename One 开发者指南中,写了如何自定义 Android 上的 "Done" 按钮(“Action Button Client Property") and how to hide the VKB toolbar on iOS (section "Next and Done on iOS”部分),但没有指示隐藏 "Done"按钮。
全局使用:
Display.getInstance().setProperty("iosHideToolbar", "true");
或针对特定组件
textField.putClientProperty("iosHideToolbar", "true");