I have a custom class extending WebView that displays HTML content. When the user clicks a link in the HTML document, I calculate an X value to scroll to, and then use scrollTo(x,y) to show that location via a runnable (see below)
post( new Runnable() {
@Override
public void run() {
scrollTo( x, 0 );
MyWebView.this.invalidate();
MyWebView.this.buildDrawingCache();
MyWebView.this.refreshDrawableState();
MyWebView.this.postInvalidate();
}
} );
After scrolling, there is a chance that the webview will fail to render the entire document. Rectangular chunks of white space are shown where text should be, with seemingly random placement each time. Here is a screenshot: http://i.imgur.com/g192Y.jpg
When I touch the webview to scroll, it will immediately render the missing portions.
So far this behavior is constrained to the Samsung Galaxy 10.1" tablet.
Does anyone know a workaround / how to force webkit to re-render the page?