简体   繁体   English

数值软键盘控制

[英]Numeric Soft Keyboard control

I have an EditText control for currency input, however, as everybody knows, Android does not replace the decimal separator in the keyboard like the users locale. 我有一个用于货币输入的EditText控件,但是,众所周知,Android不会像用户区域设置那样替换键盘中的小数点分隔符。

So I'm thinking on creating a dialog to edit this value, like a calculator. 因此,我正在考虑创建一个对话框来编辑此值,例如计算器。 This way I won't have an EditText, but a TextView with a numeric soft keyboard. 这样,我就不会有一个EditText,而是一个带有数字软键盘的TextView。

Do you know any numeric keyboard control that I can plug into my dialog? 您知道我可以插入对话框的任何数字键盘控件吗? Or maybe a solution to this Android gap? 也许可以解决这个Android差距?

For similar problem, I used: 对于类似的问题,我使用了:

android:inputType="date"

in xml layout for EditText. 在EditLayout的xml布局中。 This gave me a numeric soft keyboard like calculator. 这给了我像计算器这样的数字软键盘。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM