For edittext, Is it possible to use InputType.TYPE_CLASS_NUMBER and show only a numpad but allow letters?

98 Views Asked by At

Is it possible to display only a number pad like w/ InputType.TYPE_CLASS_NUMBER but accept letters and hyphens too?

1

There are 1 best solutions below

0
On BEST ANSWER

Setting the edittext's key listener did the trick. editText.setKeyListener(DigitsKeyListener.getInstance("0123456789.-abc......etc));