ユーザーが WebView
で(html) Textfield
をクリックすると、ソフトキーボードが表示されます。
しかし、 WebView.loadUrl()
でJSをロードすると、ソフトキーボードが消えます。
私は新しいページを読み込むときの動作を理解しています。しかし、JSを読み込むときに WebView
の動作を変更するにはどうすればよいですか?
JSをロードする別の方法はありますか?
I also tried to handle the keyboard manually. But there are too many drawbacks.
It is complicated to determine if the keyboard is shown. And I would have to change my layout:
How to check visibility of software keyboard in Android?
And the keyboard would not be in the control of the WebView
anymore.
Q:ソフトキーボードに影響を与えずにJSをWebViewにロードする方法は?