网页加载错误显示错误网址问题
This commit is contained in:
parent
267d07f3a5
commit
99b9af2980
@ -152,10 +152,12 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
// 这个方法在6.0才出现
|
||||
int statusCode = errorResponse.getStatusCode();
|
||||
if (404 == statusCode || 500 == statusCode) {
|
||||
if ( !request.getUrl().toString().contains("favicon.png")){
|
||||
htmlError.setVisibility(View.VISIBLE);
|
||||
htmlError.setText("errorCode:" + statusCode +"\n failingUrl:" + request.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
mWebView.setWebChromeClient(new WebChromeClient() {
|
||||
@Override
|
||||
|
@ -209,10 +209,12 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
// 这个方法在6.0才出现
|
||||
int statusCode = errorResponse.getStatusCode();
|
||||
if (404 == statusCode || 500 == statusCode) {
|
||||
if ( !request.getUrl().toString().contains("favicon.png")){
|
||||
htmlError.setVisibility(View.VISIBLE);
|
||||
htmlError.setText("errorCode:" + statusCode +"\n failingUrl:" + request.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if (bundle.getBoolean("banScrollY", false)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user