I have a strange problem with my webview. I have a basic webview that I use to display webpages. This works the majority of the time, but there is one site in particular that does not render. I am not sure how to begin to debug this problem. Here is my initialization code for the webview:
webView = (WebView) findViewById(R.id.rss_webView);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return true;
}
});
webView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress)
{
pb.setProgress(progress);
if (progress == 100)
pb.setVisibility(View.GONE);
else
pb.setVisibility(View.VISIBLE);
}
});
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSupportZoom(true);
webView.loadUrl(URL);
The URL that is having problems is: http://twitter.com/AdamSchefter/statuses/236553635608285184
This page (and other twitter pages) render as a blank gray square on the screen with no content.
I have noticed that if I open the url with my normal Android browser it gets redirected to a mobile version. The webview does not do this as far as I can tell. When setting breakpoints in the shouldOverrideUrlLoading() method, I don't receive any redirect urls.
I have scanned logcat for any indication of error. I don't think the webview performs any logging to log cat at all (other than a not that a webview was loaded) because there is nothing there.
I am not sure how to track down this issue. Any thoughts?
I have a lot of twitter sources that I need to display and I don't have control over the URL.