当我尝试加载https网址时,会产生一个空白页面。我在webviewclient中覆盖了onReceivedSslError方法,但是这个覆盖的方法永远不会执行。另外我覆盖了onReceivedError方法,其中我将CONNECTION_TIMED_OUT作为错误描述参数。
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
super.onReceivedSslError(view, handler, error);
handler.proceed();
}
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
// TODO Auto-generated method stub
super.onReceivedError(view, errorCode, description, failingUrl);
Toast.makeText(getApplicationContext(), description, 200).show();
}