Read Keyboard events in Android WebView

前端 未结 4 2203
旧时难觅i
旧时难觅i 2020-12-15 09:23

I\'m trying to listen to key events in android web view. Example when user is filling a form, I should receive the key events. This is my WebView code

public         


        
4条回答
  •  悲哀的现实
    2020-12-15 10:03

    I don't know if you tried this already but...alternatively, you can enable javascript for your "MyWebViewClass" and use javascript events to call java code using webView.addJavascriptInterface(....etc)

    Full Story :- http://developer.android.com/guide/webapps/webview.html#BindingJavaScript

提交回复
热议问题