Android模拟器:插入负数? [英] Android emulator : insert negative number?

查看:116
本文介绍了Android模拟器:插入负数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想这一定是容易的,但我怎么插入一个负号的的EditText

I suppose it must be easy but how do I insert a negative number in an EditText?

我运行在Mac上的模拟器。

I am running the emulator on a Mac.

感谢您。

推荐答案

只需preSS' - '你输入号码前

Just press '-' before you enter the number?

如果这是不可能的,有可能是一些错误的EDITTEXT的inputType下。
例如,的android:inputType下=numberDecimal不允许负数。在这种情况下,你应该加上:的android:inputType下=numberDecimal | numberSigned

If that's not possible, there is probably something wrong with the inputType of the editText. For example, android:inputType="numberDecimal" doesn't allow negative numbers. In that case you should add: android:inputType="numberDecimal|numberSigned".

这篇关于Android模拟器:插入负数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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