Android: WebView that is hidden in a ViewFlipper does not apply its WebSettings
I am working on an app that has multiple WebViews
in a ViewFlipper
. When I try to adjust the font size for all the webviews at the same time (by calling getSettings().setTextSize(TextSize)
) only the current view in the flipper updates the font size. I also tried reloading (webView.reload()
) the hidden views but it does not work at all.
The closest I have been able to get is by reloading the web views when they become the active开发者_JAVA百科 view, but then there is a delay of few seconds until the font size updates (and I think page reloading is not a good answer to this anyway...).
Does anyone know how to update all views that are in a ViewFlipper
? Thanks for your answers :)
All view inside viewflipper are initiated when you start or create Activity(depend on your code), so on flipping your web view is not updating. You should code inside OnFling() function for webview update, below link, you may looking for that..
Android ViewFlipper not flipping
精彩评论