웹뷰 사용자 오류 페이지
페이지 정보

본문
둘중 하나다. 뭘까?
mWebView.setWebViewClient(new WebViewClient(){
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {super.onReceivedError(view, request, error){
String customErrorPageHtml = "<html><center><br><br><br><span style='font-size:32px;'>페이지를 로드할 수 없습니다</span></center></html>";
view.loadData(customErrorPageHtml, "text/html", "UTF-8");
}
});
mWebView.setWebViewClient(new WebViewClient(){
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
view.loadUrl("about:blank");
}
});
- 이전글kcp 연동시 현대카드 오류날때 "웹페이지를 사용할 수 없음 다음 이유로 intent:hdcardappcardansimclick://appcard?acctid=202302180053270468604914771411#Intent;package=com.hyundaicard.appcard;end;의 웹페이지를 로드할 수 없 23.02.18
- 다음글swipeRefreshLayout 와 WebView의 스크롤 문제 22.08.26
댓글목록
등록된 댓글이 없습니다.