有没有什么办法来限制允许输入时只有某些选定的字符集的用户(例如:A或B或C或D)的安卓layout.xml
Is there any way to limit users allowed to type only some selected character set (Eg: A or B or C or D) in Android layout.xml
使用的digits属性,只能传递给位的字符
将在允许的EditText。
Use the digits
attribute, only the characters passed to digits
will be allowed in the EditText.
android:digits="abc123"
是的,数字是一个误导性的名称,它接受字母和符号了。
And yes, "digits" is a misleading name, it accepts letters and symbols too.