jeudi 27 juillet 2017

Android Webview Open keyboard on HTML Input autofocus (numeric)

I have a HTML file with numeric input loaded in Android webview. I have input autofocus but that dont open the android keyboard. Hence I programmatically open the softkeyboard after the page load using this

InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(webview, 0);

I can type and the value is entered in the HTML input field. But the field is of type='number' and I need android to open numeric keyboard.

How can I programatically open android numeric keyboard?




Aucun commentaire:

Enregistrer un commentaire