Validations in android/eclipse

后端 未结 1 1188
别跟我提以往
别跟我提以往 2020-12-06 14:36

How to restrict an edittextbox with numbers and special symbols on android/eclipse.

ie., i must want to allow only the characters (a-z & A-Z) not the others.

相关标签:
1条回答
  • 2020-12-06 15:11

    //ya its avilable

    in your string.xml you can add and resource as

    <string name="specific_chars">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz _1234567890</string>
    

    and access in your edit text add attribute as

    android:digits="@string/specific_chars"
    

    now only the specified characters only edittext will take.

    0 讨论(0)
提交回复
热议问题