如何限制与机器人/月食数字和特殊符号的edittextbox。
How to restrict an edittextbox with numbers and special symbols on android/eclipse.
也就是说,我必须想只允许字符(AZ&安培; AZ),而不是别人。
ie., i must want to allow only the characters (a-z & A-Z) not the others.
有没有可以通过的.xml(文件)?
Is there any options available to do this through .xml(file)?
在此先感谢!
//雅的即时拍摄
在你的string.xml您可以添加和资源作为
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"
现在只有指定的字符唯一的EditText需要。
now only the specified characters only edittext will take.