1

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 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 :)

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Tihtinen
  • 19
  • 1
  • I have tried this in a toy project, and I am seeing all the WebViews get updated. I am changing the text size in the onClick of a Button's OnClickListener. – Brian Cooley Mar 24 '11 at 04:15
  • Here's the github repo if you want to take a look: https://github.com/blcooley/ViewFlipperTest – Brian Cooley Mar 24 '11 at 04:45

1 Answers1

0

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

Community
  • 1
  • 1
Anand Tiwari
  • 1,583
  • 10
  • 22