Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Webview : Display numberpad?

I implemented a WebView in my android app displaying a web form. One of the fields ask for the user to manually enter his phone number (in case the phone does not allow extracting of phone number).

Right now, the qwerty soft keyboard pops up when user selects the field. Is there a way I can have the numberpad display instead?

(Remember I'm using HTML and not native controls)

Thanks! Shaun

like image 541
Shaun Avatar asked Dec 03 '25 01:12

Shaun


2 Answers

just use <input type="number /> in a form, that will bring up the number keypad

like image 65
Rishi Avatar answered Dec 05 '25 16:12

Rishi


There is an HTML input type specially for phone numbers for that you should use

<input type="tel" />
like image 35
Syed Wajahat Ali Avatar answered Dec 05 '25 14:12

Syed Wajahat Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!