How to restrict the EditText to accept only alphanumeric characters

In the XML, add this:

 android:digits="abcdefghijklmnopqrstuvwxyz1234567890 "

Leave a Comment