1. 程式人生 > >WebView呼叫了onReceivedError之後,還是呼叫onPageFinished。

WebView呼叫了onReceivedError之後,還是呼叫onPageFinished。

http://stackoverflow.com/questions/23808868/is-onpagefinished-is-called-after-onreceivederror-in-anyway

可以看到

onPageFinished tells you that the WebView has stopped loading. onReceivedError tells you there was an error. They're not "success" and "failure" callbacks which is why you'll get both in case of an error.


onPageFinished僅僅表示網頁載入完成了,不能說明這個網頁是否成功的載入了。

Android 網路] WebView如何判斷頁面真正成功載入? 


http://www.eoeandroid.com/thread-304637-1-1.html?_dsign=f339dc4e

[Android 網路]判斷webview載入網頁是否完全載入成功

http://www.eoeandroid.com/forum.php?mod=viewthread&tid=327795&extra=page%3D1&page=2

解決方案:webview載入網頁,網頁中js可以判斷圖片是否載入完成,判斷之後呼叫原生代碼通知一下就知道了