问题描述
所以我一直在玩一些数学问题的小游戏.例如,该应用程序会给您一个类似23 + 47的问题,这很好,但是,当它给您一个类似9/6的问题时,就会出现问题.由于您在EditText中输入结果,因此我需要正确的输入类型.但!当我这样做
So i have been playing around with a little game with some mathematical questions. The application gives you, for example, a question like 23 + 47, and that's fine and all, but when it gives you a question like 9/6 the problems appears. Since you input the result in an EditText, i need the correct input type. But! when i do
android:inputType="numberDecimal"
它附带的软键盘是没有分隔符的软键盘,这意味着我无法使用逗号.它几乎毁了游戏:-)我已经尝试过
the soft keyboard it comes up with, is a soft keyboard without seperators, which mean i can't make commas. And it pretty much ruins the game :-)I have tried things like
android:inputType"numberSigned | numberDecimal"
我也尝试过
android:digits ="0123456789."
但到目前为止没有任何效果.
android:digits="0123456789."
but nothing worked so far.
我只是无法安装正确的键盘.
I just can't get the right keyboard up.
有什么建议吗?
推荐答案
android:inputType="numberDecimal"
用于接受十进制输入,因此从0到9的所有数字(包括小数点符号(.))只能是输入值.而且效果很好.我不知道逗号在哪里出现.
is for taking decimal inputs, so all the digits from 0 to 9 including the decimal point sign(.) only can be the input values. And it works fine. I don't understand where comma sign came into picture.
这篇关于Android inputType ="numberDecimal";调出没有逗号的键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!