开发者

Text Keyboard with Numbers Mode

I have an EditText which accepts numbers and characters as input. Most of t开发者_JAVA技巧he time the user enters numbers and I want to have the text keyboard but it should be in symbols or numbers mode where you can enter the numbers directly. Is this possible?

On the Nexus S there are characters on the keyboard with input type set as "number" but I cannot add characters.

Thanks in advance


Not sure why it works but works at least on my Motorola RAZR

editText.setInputType(InputType.TYPE_CLASS_TEXT); editText.setRawInputType(InputType.TYPE_CLASS_NUMBER);

This show numeric keyboard but if you need you can switch to the text mode

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜