带数字输入的 j2me 密码字段
我曾经用来
this.passwordTextField = new TextField( "", "", 30, TextField.PASSWORD | TextField.DECIMAL);
获取数值密码字段。但它仍然以“#”作为条目并显示“.”对于输出端。但我只需要数字。我也用过,
UiAccess.setInputMode( this.passwordTextField, UiAccess.MODE_NUMBERS);
应该怎么做呢?
I have used
this.passwordTextField = new TextField( "", "", 30, TextField.PASSWORD | TextField.DECIMAL);
to get the numeric value password field. but it still takes "#" as an entry and show "." for that at output. but I only need numbers. I also used
UiAccess.setInputMode( this.passwordTextField, UiAccess.MODE_NUMBERS);
how should i do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也可以通过使用来解决
It also can solved by using
试试这个:
带有
TextField.DECIMAL
的文本字段约束将允许用户输入字符-
和.
, 检查此。您甚至可以通过尝试约束
TextField.PASSWORD | 来变得更聪明。文本字段.NUMERIC | TextField.SENSITIVE
Try this :
The textfield constraint with
TextField.DECIMAL
will allow the user to enter characters-
and.
, check this.You can even be smatter by trying the constraint
TextField.PASSWORD | TextField.NUMERIC | TextField.SENSITIVE