Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 534
gatzkerob Avatar asked Mar 25 '12 21:03

gatzkerob


1 Answers

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"/>
like image 86
Titouan de Bailleul Avatar answered Oct 14 '22 04:10

Titouan de Bailleul