警报在 JavaME 中无法正确显示
任何想法为什么 Java ME 应用程序中的警报对话框在真实手机 (N82) 上无法正确显示(顶部有白色条纹),它在模拟器上运行良好。所以我认为这不是编码的问题。查看截图:
-> N82
->模拟器
有什么想法为什么?
any ideas why the Alert dialog in Java ME application is not displaying properly (white stripe on a top of it) on a real phone (N82), it works well on an emulator. So it is not a matter of coding I suppose. See screenshots:
-> N82
-> Emulator
any ideas why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
警报和其他 GUI 组件取决于设备的实现。这意味着这些 GUI 对象是“本机”GUI。
您可以通过在 Canvas 上创建自己的 GUI(例如 J4ME、J2MEPolish 和 LWUIT)来解决此问题。
Alerts and other Gui components are device's impementation depended. That means these GUI objects are "native" GUI.
You can solve this issue by creating your own GUI over Canvas, like J4ME, J2MEPolish and LWUIT.
你所描述的情况很可能是N82的一个错误。
想一想 - lcdui Alert API 不允许开发人员进行任何与“像素渲染”工件相关的任何事情,例如 显示在您的屏幕截图中。应用程序开发人员只能在警报中影响的内容包括标题文本和警报、超时值等 - 并根据您的 模拟器屏幕截图,看起来您的代码正确地完成了自己的部分(尽管不能 100% 确定这一点,因为您没有显示您使用的代码片段)。
Screen对象是渲染是希望通过实现来完成的。因此,每当您在使用的高级屏幕上注意到渲染伪像时,最合理的解释就是 MIDP 在特定设备上实现方式中的错误。
What you describe is most likely a bug in N82.
Think of it - lcdui Alert API does not allow developer anything that would anyhow be related to "pixel rendering" artifacts like shown at your screen shot. Only things application developer can impact in Alert are like text of the title and alert, timeout value, stuff like that - and judging by your emulator screen shot, it looks like your code does its part right (although one can't be 100% sure about that since you didn't show the snippet of the code you use).
The whole point of high level API provided in Screen objects like Alert is that rendering is expected to be done by implementation. Because of that, whenever you notice rendering artifacts at high level screens you use, the most reasonable explanation would be the bug in the way how MIDP is implemented at particular device.