F
F
falstaf2012-01-31 10:48:24
Java
falstaf, 2012-01-31 10:48:24

Android. After displaying the WebView, is the previous content displayed for a fraction of a second?

Good afternoon.
There is a WebView into which the content is loaded. After clicking the Next button, this WebView is hidden via setVisibility, and a ProgressBar is displayed in its place. When we receive onPageFinished from the WebViewClient set to this WebView, hide the ProgressBar accordingly and show the WebView again.
The problem is this. After hiding the progressbar and displaying the webview, it displays the previous content for a fraction of a second, after which the new one, already loaded in the WebView, is drawn. All this creates a very unpleasant visual effect.
I poked around with the drawing cache of the WebView, tried to clear it, invalidate the WebView, and so on, all this did not give any results.
I would be grateful for any help and advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Slyusar, 2012-01-31
@slesar

Try using an intermediate page (nothing, just a background).
I used a similar trick when I needed to scroll the page to the anchor. Sometimes it worked.
In general - do not use WebView. Very dark matter, completely inadequate instrument. In the end, I ran into this code.google.com/p/android/issues/detail?id=17535 and then spent almost a month redoing the project.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question