How to restrict the special characters in android EditText field?
+2
A:
have you tried adding the android:digits="abcde.....012345789"
attribute?
although the android:digits specify that it is a numeric field it does work for me to set it to accept letters as well, and special characters as well (tested on SDK-7)
if this doesn't work then you'll have to implement KeyListener see: link text
alvin
2010-08-02 07:08:46
thanks alvin its work fine
saravanan palpandi
2010-08-02 09:47:14
if it works fine please mark my answer as accepted, http://meta.stackoverflow.com/questions/5234/accepting-answers-what-is-it-all-about
alvin
2010-08-02 19:03:03