Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个editText,它设置为只接受数字,正如预期的那样,键盘会弹出来输入数字,但它也有@, & #,等等。我想显示我们在默认拨号器中拥有的键盘,用于输入电话号码打电话。当动机是只输入数字时,这个更容易使用。有什么办法吗?
@, & #,
android:inputType="phone"应该做你想做的。
android:inputType="phone"
根据您的要求设置编辑文本属性,例如...
android:inputType="numberDecimal"
安卓:inputType="数字"
安卓:inputType="电话"