I faced the same issue here. Basically I have text-webview-text in vertical linear layout as shown below:
__________
| Textview |
|__________|
| WebView | <-can zoom
|__________|
| TextView |
|__________|
The webview has a zoom toggle, when the content zooms larger webview will adjust to a bigger size and push down the textview:
__________
| Textview |
|__________|
| |
| |
| WebView |
| |
|__________|
| TextView |
|__________|
Until now everything is fine. The problem is, when I zoom back to smaller size, the content inside webview shrinks but webview itslelf is still same size, leaving a large gaping empty space:
__________
| Textview |
|__________|
| WebView |
| |
| |
| |
|__________|
| TextView |
|__________|
My problem is also similar to this one. Calling invalidate() won't work, and I don't want to recreate the fragment without destroying the activity (I actually don't know how). My question is, how can I update/resize the height of the webview when I zoom it from larger to smaller? (NOTE: I add all the views dynamically, so please show me how I can solve it programatically. Thanks)
This weird problem doesn't exist in Froyo 2.2 but it is a bugging issue in JB 4.2.2 real device.