Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webview html input form not showing/allowing keyboard

I need some help with showing/allowing the keyboard to show and input.

My basic app has a main screen with buttons, on button click it opens a webview, one of my buttons opens a webview to an HTML page with an input form. When you click on an input field, the keyboard does not show and when you use the hardware keyboard on the emulator it just brings up chinese suggestions and does not input any text.

like image 956
Brent Hacker Avatar asked Feb 13 '12 14:02

Brent Hacker


1 Answers

As Brent suggested, following line will serve the purpose -

webView.requestFocus(View.FOCUS_DOWN);

this happens because on page loading webpage loses its focus so this line just bring the focus back to page.

For those who end up at this question, A detailed discussion on this topic is here

like image 176
Darpan Avatar answered Nov 09 '22 15:11

Darpan