Android WebView flickers after call clearView ()

I am using android.webkit.WebView to display some HTML formatted information to the user. Whenever I "page" in my application, I reuse all the graphics on the screen and just fill them with other content. The WebView will by default grow in size to fit the content, but will not shrink if the content shrinks.

To fix this, I call webView.clearView()

to clear the view and then webView.loadDataWithBaseURL(null, html, "text/html", "utf-8", null)

to reload it with data. It works, but creates very strange behavior when the view starts flickering constantly. The shimmery area appears to be the same as what would be empty after filling it with less content.

I can't describe it better with words, so I created a short video to illustrate the problem: http://www.youtube.com/watch?v=yL7tQpRSFe0

The WebView is a yellow border at the bottom of the screen.

Am I doing something wrong or is this a bug? If this is an Android bug, is there a better way to resize the view to get around this issue?

+3
android android-webview


source to share


No one has answered this question yet

Check out similar questions:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1858
"Debug certificate expired" error in Android Eclipse plugins
1844
What is "Context" on Android?
320
Android webview launches browser when loadurl is called
1
Changing font size doesn't work for webview in fragment (FrameLayout)



All Articles
Loading...
X
Show
Funny
Dev
Pics