Cómo verificar si la página en WebView o no en Android Studio
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
}
}
android developer