How to exclude special characters from android key

2019-01-12 05:59发布

Hi I want to show only numbers and characters on the keypad for EditText in android, I did try to add the attribute android:inputType = text|number but it did not work.

Please help me with any other better suggestion. thanks in advance.

7条回答
我命由我不由天
2楼-- · 2019-01-12 06:27

If you want to add spaces you can give space after the last digit.

 android:digits="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 "
查看更多
登录 后发表回答