只需要为WebView设置WebChromeClient,并且重写openFileChooser和onShowFileChooser方法即可。
上代码:
mWebView.setWebChromeClient(new WebChromeClient() { @Override public void onProgressChanged(WebView view, int newProgress) { if(newProgress == 100){ dismissLoadingDialog(); } } public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {