I'm trying to get an editTextview that only allows letters (lower- and uppercase).
It works with this code:
edittv.setKeyListener(DigitsKeyListener.getInstance("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"));
The problem is that I get a numerical keyboard like this:
To go back to a normal keyboard I found this code:
edittv.setKeyListener(DigitsKeyListener.getInstance("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"));
edittv.setInputType(InputType.TYPE_CLASS_TEXT);
It works for getting the keyboard back but then all characters are allowed again, so it undo's the previous code.
So, how can I only allow letters with an alphabetical keyboard programatically.