EditText Input type Issue

前端 未结 3 561
悲&欢浪女
悲&欢浪女 2020-12-22 07:32

There is a name EditText in my screen. I want to accept only alphabets means from a-z,A-Z and should not accept numbers, special chars.

I\'am using

3条回答
  •  难免孤独
    2020-12-22 08:05

    Your best bet is to use an InputFilter to restrict the characters that are permitted in your EditText control. You should be able to easily adapt the answer from How do I use InputFilter to limit characters in an EditText in Android? to do what you require.

提交回复
热议问题