使“ j2me警报关闭”按钮不可见 [英] Make j2me Alert Dismiss button invisible

查看:109
本文介绍了使“ j2me警报关闭”按钮不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将Alert设置为FOREVER时,有什么方法不显示默认的关闭按钮吗?

Is there any way to not show the default dismiss button when I set Alert to FOREVER?

我正在关注以下帖子,但显示的是一个不带按钮的按钮字符。

http://code-gotcha.blogspot.com/2011/09/dismiss-button-in-nokia-alert.html?showComment=1346738220258#c4876777871081894195

I was following the following post but it shows me a button with no characters.
http://code-gotcha.blogspot.com/2011/09/dismiss-button-in-nokia-alert.html?showComment=1346738220258#c4876777871081894195

alert.addCommand(new Command("\u200B", Command.OK, 1));
//we dont like to see the DISMISS command, so adding an invisible command

I我正在使用LWUIT表单,但刚刚调用了j2me本机警报来使应用程序具有本机外观。

I am using LWUIT forms but have just invoked j2me native alerts to give the app a native look and feel.

推荐答案

没有可移植的方法

都不使用 Alert 命令具有可以以某种方式确保应用程序开发人员的任何功能

Neither Alert nor Command have any feature that would somehow ensure application developer that particular tricks to command label would make its button invisible.

即使某些hack在特定设备上起作用,也不能保证它可以在另一个设备上起作用。

Even if some hack works at particular device, there's no guarantee that it will work on another. This applies even if you limit self to Nokia devices only - Nokia MIDP implementers are not bound by any specification to adhere to that funny trick with "\u200B" that worked once upon the time with specific device, they "have a right" to change that in any other device and even more, in any newer version firmware for the same device.

即使您仅将自己限制为诺基亚设备,这也适用-诺基亚MIDP实施者不受任何规范的约束,必须遵循曾经有效的 \u200B 在使用特定设备时,他们有权在其他任何设备上甚至在同一设备的任何较新版本的固件中进行更改。

As for giving the app a native look and feel if you want this I would strongly recommend you to think twice before using hacks like one you mention because these could very likely have an opposite effect.

如果要给该应用程序以本机的外观,我强烈建议您在使用像您提到的hacks之前三思而后行,因为这些很可能产生相反的效果。

Just think of it, users who'd recognize Alert look and feel as familiar one, are most likely used to it from multiple other MIDlets. But thing is, most of these other midlets most likely use non-hacked Alerts that have well defined behavior, when dismiss command appears in particular context.

只需考虑一下,那些将Alert的外观和感觉识别为熟悉的用户,很可能会从其他多个MIDlet中使用它。但是事实是,当在特定上下文中出现dismiss命令时,大多数 other 小实例最有可能使用行为明确的非黑客警报。

Now think of how your app would feel in comparison to these typical, regular midlets? Yeah Alerts will look familiar but behavior will differ. In situations when user would expect Alert to have dismiss command, it would not. This is basically a royal road to get users confused and feel bad about unexpected behavior.


Oh that 应用程序,例行屏幕的行为方式不正确...

Oh that application, the one where routine screen behaves in the wrong way...

这篇关于使“ j2me警报关闭”按钮不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆