问题
Is it possible to have this keyboard in android when user tap on an edit text?
This keyboard needs to come up first. I used different input type however I didnt get the one that I attached.
Can someone please advice?
回答1:
Is it possible to force that specific type of keyboard? No. You can't even force the keyboard to exist. The user chooses a keyboard program, such as the default Android keyboard, Swype, SwiftKey, etc. You can specify an input type like URL, numeric, text, password, etc. The keyboard the user selected will then choose what keyboard to display by default, based on its own logic, the input type, and any user settings. There is no way to force anything to a specific type of keyboard, although most of them will see numeric and switch to a keypad or numeric style keyboard.
回答2:
A way to do it could be assigning a pattern to the input, like <input type="text" pattern="\d*"/>
However this will also force only numbers entered.
One way to avoid the pattern being enforced is to avoid validation, so your input can look like this <input type="text" pattern="\d*" novalidate="true" />
来源:https://stackoverflow.com/questions/16555997/android-keyboard-type