I want to restric user from entering any special character or number into edit text, but programmatically it should allow.
I know I can make inputType="text"
but it deals only with the softkeyboard. I think it can be achived with TextWatcher, but I am not able to gel evrything. Can anyone help ?
There are many other types of inputs available for Password, Email address etc. Please see This API Link
Thanks :)
Try this way,Reference
For more info, you may check http://developer.android.com/reference/android/widget/TextView.html#attr_android:digits
You can filter input text by following ,