views:

243

answers:

1

Hi all,

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

A: 

Hello Shaun, I have just start programming Android so I don't know If I will be able to help. First of all, the only place in which you can see numeric keypad in android is in the call application. Any other keyboard is standard qwerty (or swype or any other you have installed), even if you are filling a number field. That made me think that numeric keyboard is a call application implementation and is part of that application, so it is not accessible any other way. I'm almost sure it works that way. Therefore if you want numeric keyboard only I think the only way is to implement your own numeric keyboard and connect the key pressed to the add text events of WebView. You just need 10 buttons so it should´n be very complicated. You may be able to override the input method for your application only but as I say I'm pretty new in Android so I don't know how to do that.

cnebrera
Thanks for the quick reply. I'm sorry I didn't make myself clearer; I don't need the dialpad, just the keyboard showing the numbers and all that you get when you click on the numeric button on the qwerty keyboardfor example: http://www.androidtapp.com/wp-content/uploads/2010/03/Swype-Keyboard-Numbers.jpg (of course this is the swype keyboard..)
Shaun
Ah ok, I understand now :). I guess that should be possible, but I have no idea how I'm sorry. I hope to be more helpful when I have learn more about android.
cnebrera