使用 J2ME Polish 和 Generic MPDP2 构建的菜单(命令)
我在我的应用程序中使用 J2ME Polish。该应用程序本身相当简单,但我们对其进行了改进,因为它有漂亮的用户界面。我想要一个类似于所附图片的弹出菜单(命令)。我能够为特定于设备的版本(例如诺基亚 6212 Classic)获得这种 UI,但不能为通用 MIDP2 版本获得这种 UI。
我相信所有内容都在 J2ME Canvas 上呈现,并且我看不出有任何技术原因无法为通用设备呈现。有人可以告诉我这是否是设计上不可能的吗?
任何有关如何使其工作的指示都将受到赞赏。谢谢。
I am using J2ME Polish for my application. The app itself is fairly simple but we are using polish for it's nice UI. I would like to have a popup menu (Command) that is similar to the picture attached. I am able to get this kind of UI for device specific builds, such as Nokia 6212 Classic but not for Generic MIDP2 builds.
I believe everything is being rendered on J2ME Canvas and I don't see any technical reason why this cannot be rendered for a generic device. Could anyone out there let me know if this is not possible by design?
Any pointers on how to get this working is appreciated. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在浏览了文档“J2ME Polish 的完整指南,专业无线 Java 开发的解决方案”后,我找到了解决方案,我强烈推荐给任何使用此库的人。
当设备具有时,J2ME Polish 支持“菜单”模式当您为设备数据库(devices.xml 和其他相关 xml 文件)中已存在的设备进行开发时,此功能默认可用,但如果您为自定义设备进行开发,则需要使用此功能。例如,我正在为所有诺基亚 S40、S60 设备进行开发,
为此设备添加以下条目:Nokia/Midp2CLDC11。
I have found the solution after going through the document 'Complete guide to J2ME Polish, The solution for professional wireless Java development", which I highly recommend for anyone making use of this library.
J2ME Polish supports "menu" mode when the device has a feature "hasCommandKeyEvents". This is available by default when you are developing for a device that is already present in the device database (devices.xml and other related xml files). But if you are developing for a custom device, this feature needs to be set for the device definition. For example, I am developing for ALL Nokia S40, S60 devices. Add the following entry in the file custom-devices.xml.
Build for this device Nokia/Midp2CLDC11. The UI would now show the menu.