I am using a WebView to display a picture from the net, on occasions the picture will not load.
mPicture.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {
setProgressBarIndeterminateVisibility(false);
Log("Content height: " + mPicture.getContentHeight());
}
});
The above code works fine for finding out when the WebView has loaded the content as best it can, but how can i tell if the picture was actually found/loaded. I was hoping to this by using the size of the content loaded, but there is not method for this, tried using the content height, but get the same value for no pic loaded as i do for a portrait loaded picture.
Any idea’s?
No, you cannot detect if a an individual element of a the HTML code has been loaded. You can only tell if the page is loaded.
The page has finished loading when all the content has been downloaded or all the content that can be downloaded has been downloaded.