WebView.getProgress() always returning 100
I am experiencing the same bug reported here (http://code.google.com/p/android/issues/detail?id=9597)
Anyone know of a work around? I 开发者_如何学JAVAwant to have a progress bar in a WebView like the Android Browser does while the page is loading.
You need to implement a WebChromeClient
to capture the progress change with the onProgressChanged()
method:
http://developer.android.com/reference/android/webkit/WebChromeClient.html#onProgressChanged(android.webkit.WebView, int)
See the answer to this question: Android WebView progress bar
And you can actually see an example in the WebView documentation: http://developer.android.com/reference/android/webkit/WebView.html
精彩评论