tags:

views:

119

answers:

1

I'm new to android. I'm using webview in scrollview to display my local html page (html has text only). I created two buttons for zoomin and zoomout using behind function zoomIn() & zoomOut() respectively. These functions work fine. The problenm is, when I zoom in, some of the text goes out from both top and bottom and it doesn't appear when I scroll.

How can I resolve this?

A: 

This question is pretty old, so it's probably answered already, but just in case...

When a WebView zooms, it clips the content to its own view rectangle. From the description of your setup, it sounds like you're scrolling the WebView itself within its parent scroll view. What you want to do is scroll the WebView's contents. You can do this by calling WebView.scrollTo or WebView.scrollBy (inherited from View), or conversely, from within the WebView's JavaScript by calling window.scrollTo.

Kris Giesing