Have you tried setting the Initial Scale to 100%, and setting the
Layout Algorithm to normal?  A code example is below (assume appView
is a WebView):

        appView.setInitialScale(100);
        WebSettings settings = appView.getSettings();
        settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);

Also, if you use the viewport tag in your header, it will scale it to
the resolution:
<meta name="viewport" content="width=320; user-scalable=no" />

I prefer NOT using the viewport meta tag, and actually using HTML and
CSS relative values for HTML-based UI whenever possible.  Setting the
Layout Algorithm is essential if you want your CSS to actually work
properly so that 100px is really 100px.

On Mar 22, 11:21 am, Brian <[email protected]> wrote:
> I am working on an app that has a WebView that contains 5 pages. When
> the webview page is first loaded, everything displays fine, but as
> soon as you click Next on the first page everything shrinks down, as
> if the webview window size has collapsed. Then when you click back to
> the first page, it is collapsed as well, even though it displayed fine
> when the window first opened.
>
> I am thinking somehow the webview is changing size because the color
> is just white surrounding my smashed page, even though the background
> color of the page is dark.
>
> This only happens when the content is set to be 100% wide in the HTML,
> if I set a pixel width it maintains the size, but I need it to scale
> for the different android phones.
>
> Any thoughts / ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en.

Reply via email to