2010-06-13 49 views

回答

6

这并没有为我工作的。不过,我可以通过以下任一种方法完成上述操作:

// TYPE_CLASS_NUMBER: Class for numeric text. This displays the numbers/symbols keyboard. 
editText.setInputType(InputType.TYPE_CLASS_NUMBER); 

// TYPE_CLASS_PHONE: Class for a phone number. This displays the phone number keypad. 
editText.setInputType(InputType.TYPE_CLASS_PHONE); 
1

这就是我脱下了谷歌API

//Set the input style to numbers, rather than qwerty keyboard style. 
txtView.setInputMethod(DigitsInputMethod.getInstance()); 
相关问题