I am using WebView to present UI. Is there any way that I can trigger custom soft keyboard when input text form field is selected?
Asked
Active
Viewed 4,218 times
2 Answers
1
I just encounter a similar problem with the android WebView. When I select, in touch mode, a text input field, it does not pop-up the virtual keyboard whereas with the trackball it works fine.
I just found there: http://groups.google.com/group/android-developers/browse_thread/thread/e52109afda599301/b4cbc16e4e9e8e0d (last message from alien9) that calling
myWebview.requestFocusFromTouch();
solve the problem.

ol_v_er
- 27,094
- 6
- 48
- 61
-
2It is not what I asked. For example. If you have form in which you want to enter your phone and address, I would love to enable custom and different virtual keyboards for phone and address fields. With numbers only for phone for example. – Perun Jan 06 '11 at 21:26
-
I don't understand. Do you want a customized keyboard UI? Android already supports keyboards for different input types. Start here: http://developer.android.com/reference/android/view/inputmethod/InputMethod.html – Cheezmeister Jan 25 '11 at 19:12
-
It does, but this is webview. @Ralf provided good answer if not exactly one I hoped for. I still do not know how to invoke my custom keyboard. – Perun Feb 17 '11 at 04:39
1
take a look at HTML5 - if you change your
<input type="text" ...
to for instance a
<input type="number" ...
you'll get a specialized soft keyboard for numbers.
Here is some more documentation: http://diveintohtml5.ep.io/forms.html