web.webViewClient = object : WebViewClient(){
override fun onReceivedError(view: WebView?, errorCode: Int, description: String?, failingUrl: String? ) {
super.onReceivedError(view, errorCode, description, failingUrl)
Toast.makeText(applicationContext,description,Toast.LENGTH_SHORT).show()
}
override fun onPageFinished(view: WebView?, url: String?) {
super.onPageFinished(view, url)
p.visibility = View.GONE
}
}
webView.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl) {
// TODO Auto-generated method stub
super.onReceivedError(view, errorCode, description, failingUrl);
}
@Override
public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
super.onPageFinished(view, url);
}
});