Java – accepts only a few characters of EditText

I need to implement EditText on Android, which only accepts a specific range of characters, namely: "s, a, Q, W, R, B, C, D, e, u"

Solution

How do I use these two properties in EditText?

android:maxLength="1"
android:digits = "SABCDEU"
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>