I'm using the InputMethodManager to programmatically display the softkeyboard when it's needed
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(view, 0);
Is there anyway to force the keyboard that appears into being the Number or telephone keypad?
Edit
Sorry I typed this in a hurry before I had to leave my computer for a while. I forgot to mention possibly the most crucial part. I'm trying to do this in a webview. The input type of the textbox i'm focusing on is set to tel. For some reason the numpad won't show up on autofocus which is why I'm trying to force it with InputMethodManager. My current method displays the keyboard focused on the correct field it just doesn't seem to read the type and display correctly.
Thanks for all of your answers so far(which did answer my poorly worded question).
a) in xml
b) in code
Use this code for Number :
& use this code for Phone :
For Programmatically try this
Where password is edittext.
This will Work.
Following code will display keypad to you:
However if you want to force the keyboard that appears into being the Number or telephone keypad, then you have to set the input type on that particular view/widget.
eg.