5

I want to have input type for the text boxes that only takes numbers and decimal point. Input type of Number or Decimal, still brings the full keypad and the buttons are small. Input type of Phone does the trick, but not all phones have a comma or a period/dot to enter the decimal point.

What is the best way around?

Phones without a period:

  1. Samsung Galaxy Tab
  2. Kindle Fire
4

2 回答 2

0

数字或十进制的输入类型,仍然带来完整的键盘,按钮很小。

这将因用户而异。不同的设备有不同的输入法编辑器(又名软键盘)。你的inputType价值是一种要求,而不是一种要求。给定的输入法编辑器对给定inputType的操作取决于输入法编辑器。有些会有大按钮。有些会有小按钮。有些没有按钮,因为它们被设计为与手势一起使用(例如,涂鸦键盘)。

最好的方法是什么?

用于numberDecimal您的inputType.

于 2012-04-02T16:00:57.567 回答
0

正确的方法是使用数字或小数的输入类型。之后,由键盘将其转换为最容易输入数字的布局。

于 2012-04-06T14:41:34.260 回答