Android中WebChromeClient和WebViewClient的区别浅析

 更新时间:2015年04月24日 11:43:22   投稿:junjie  
这篇文章主要介绍了Android中WebChromeClient和WebViewClient的区别浅析,需要的朋友可以参考下

1、WebViewClient就是帮助WebView处理各种通知、请求事件的,具体来说包括:onLoadResource 、onPageStart 、onPageFinish 、onReceiveError 、onReceivedHttpAuthRequest

2、WebChromeClient是辅助WebView处理Javascript的对话框,网站图标,网站title,加载进度等

onCloseWindow(关闭WebView) 、onCreateWindow() 、onJsAlert (WebView上alert是弹不出来东西的,需要定制你的WebChromeClient处理弹出)onJsPrompt 、onJsConfirm 、onProgressChanged 、onReceivedIcon 、onReceivedTitle

相关文章

最新评论