开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜