gatzkerob gatzkerob - 6 months ago 47
Android Question

Android PhoneGap - numeric keyboard only

I'm using the following code in my project and it's working fine:

"How to show and hide soft keyboard in Android"

However, I would like to replace the keyboard with the "number" keyboard. I don't want it globally, so I'm guessing I won't have to edit the xml file. It should only be numeric when I call it from the javascript.


You can get any kind of Keyboard when you tap an input depending on its type

For a numeric keyboard, you need to set its type to number

<input type="number" name="txtNumber"/>