问题
I made a very simple app that involves only numbers and there is no need to make different locale folders or anything.
When I test the app, the EditText
will take numbers when the keyboard language is English, but when I change the keyboard to other languages it does not work! pressing a number will not show up in the EditText
.
Is there a way to make the EditText
take universal numbers regardless of the language?
回答1:
I think it will work
<EditText
android:inputType="numberSigned|numberDecimal|numberPassword|number"/>
and according your need put separator between choice i.e |
and press ctrl+space you will get more option .
回答2:
you'd add android:inputType="number"
来源:https://stackoverflow.com/questions/16578009/make-edittext-accept-non-english-numbers