title: onPageFinished not firing correctly when rendering web page
body: <p>For some reason the onPageFinished is firing before the WebView has finished loading - I can't figure out why...</p>
  
  <pre><code>public class WebViewClientTest extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      final WebView webview = (WebView) findViewById(R.id.webview);
  
      webview.setWebViewClient(new WebViewClient() {  
          @Override  
          public void onPageFinished(WebView view, String url) {
              super.onPageFinished(webview, url);
              webview.scrollTo(0, 500);
          }  
      });
      webview.loadUrl("http://www.google.co.uk/search?sourceid=chrome&amp;ie=UTF-8&amp;q=lala");
  
  }
  }
  </code></pre>
  
  <hr>
  
  <p>OK, well it looks like this isn't fixed. I think there's a race condition going on when loading the page, but can't get a reproducible behaviour. </p>
  
  <p>I'm storing the HTML content of a webpage in a SQLite database for viewing when offline. I reload the content into the WebView with:</p>
  
  <pre><code>webView.loadDataWithBaseURL("fake://fake.com/", htmlBody, "text/html", "utf-8", null);
  </code></pre>
  
  <p>It seems that sometimes when the WebView loads it fires the WebViewClient.onPageFinished() method correctly, and other times it does not. Sometimes it appears to fire before the page has finished loading, producing a contentHeight of 0 and ignoring any scrollTo calls. </p>
  
  <p>Anyone have any experience with this? </p>