开发者

Help with webview - android

I'm开发者_如何学Python having troubles with a mini app which I am working on.

The mini app has a button and a webview.

The function of the button is to call a random url from a 30 url's list and to show the selected url in the webview. If you press the button again, it shows another url from the list.

Initially it was working fine, but sometimes, apparently without a reason, the web loads, but doesn't show its content.

I know it actually loads becouse I see at my log "onPageFinished()", the load ends but it only shows a blank screen. I have to reboot the app to make it work again.

I tried adding a "webView.clearCache(true)" after the load, but it doesn't work neither.

I also tried to make the button calls a "webView.loadUrl("about:blank")" in first place, but dosn't help. Even tried with "clearView()"

Sometimes it takes a while to fail, other times it seems to happen on a few trys.

Any help would be really appreciated :)

Kind regards

...Nothing in Logcat, everything looks good


Can you see which pages are failing? If you comment out the random mechanism and set the WebView to display one of the failing pages does it show? If not it is likely that the content you are trying to display can't be handled by your webview. You might need to enable flash plugins, or JavaScript on your WebView. Without knowing what the pages contain though I can only guess.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜