Android版的inputType =" numberDecimal"带来错误的键盘了 [英] Android inputType="numberDecimal" brings wrong keyboard up

查看:651
本文介绍了Android版的inputType =" numberDecimal"带来错误的键盘了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我一直用一些数学问题,一个小游戏玩耍。该应用程序为您提供了,比如说像23 + 47的问题,这是罚款和一切,但是当它给你喜欢9/6的问题出现的问题。既然你输入的结果在一个EditText,我需要正确的输入类型。但!当我这样做

 的android:inputType下=numberDecimal

它出现时,软键盘是软键盘没有seperators,这意味着我不能让逗号。而且pretty很多废墟游戏:-)
我试图像

的东西

的android:inputType下numberSigned | numberDecimal

我也试过

安卓位数=0123456789
但没有到目前为止的工​​作。

我只是不能得到正确的键盘了。

有什么建议?


解决方案

 的Andorid:inputType下=numberDecimal

是用于取小数输入,所以(。),所有的数字从0到9包括小数点符号只能是输入值。并能正常工作。我不明白的地方逗号迹象走进图片。

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"

i have also tried

android:digits="0123456789." but nothing worked so far.

I just can't get the right keyboard up.

Any suggestions?

解决方案

andorid:inputType="numberDecimal"

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"带来错误的键盘了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆