I am having some difficulty getting the Android WebView object to
properly scale my content. In iOS, the UIWebView object has a
"scalesPagesToFit" property which automatically scales content to fit
the boundaries of the UIWebView. In my case, the content contains a
number of absolutely sized/positioned items. I am easily able to re-
size the UIWebView in code, and as long as the aspect ratio is the
same as the body element of the html, the content is properly scaled
to fit perfectly.
On Android, this is proving to be much more difficult. I have tried to
manually set the WebView's initialScale, which works at first.
However, since the layout automatically changes the position/size of
the WebView, the scale gets changed by itself to a value I don't want
(as observed in the onScaleChanged event). Once this happens, I am
trying to manually change initialScale to my desired value, but it
doesn't trigger a change on the WebView. The appearance does not
change, and the onScaleChanged event is not fired.
I thought perhaps setting user-scalable to false would stop the
automatic scaling done by the WebView, which it does seem to do, but
it also prevents me from manually changing the scale myself.
Any advice would be extremely helpful, I've been at this for a while.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to