I am currently using
android:digits="qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM "
in android XML in EditText and it is working perfectly. The user can enter only characters from a-z,A-Z and space(I don't want to allow the user to enter numbers or special characters). I would like to add this property to another Edit Text field programaticaly. Can anyone help me to add the above property programmaticaly. I have referred the following links but its of no use
Change android:digits programmatically How to block special characters in androids editText? no ANDROID:DIGITS
if I use
edtTxt.setKeyListener(DigitsKeyListener.getInstance("qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM"));
numeric keypad is getting opened.