80

I am disappointed at the lack of documentation of WebView and related stuff.

(unless you think the following is propert documetation)

public void setLoadWithOverviewMode (boolean overview)

Set whether the WebView loads a page with overview mode

and:

public synchronized void setUseWideViewPort (boolean use)

Tell the WebView to use the wide viewport

So: What is "Overview mode" ? what is "Wide viewport" ?

ps: I tried to look for webkit related docs but could not find it.

2
  • 6
    Completely agree with you. As far as I understand overview viewport is something like you zoom out 100% that you get an "overiew". What wide viewport does i don't know, only that it enables double tap zooming.
    – Bloeper
    Apr 1, 2011 at 13:47
  • 1
    I agree! Joker documentation!
    – Dori
    Dec 4, 2013 at 17:02

3 Answers 3

111

Apparently:

setLoadWithOverviewMode(true) loads the WebView completely zoomed out

setUseWideViewPort(true) makes the Webview have a normal viewport (such as a normal desktop browser), while when false the webview will have a viewport constrained to its own dimensions (so if the webview is 50px*50px the viewport will be the same size)

2
  • Is setUseWideViewPort(true) similar or even identical to what web browsers apps have, when you click on "desktop site" ? Or is it a bit more complex? May 26, 2019 at 7:51
  • I think it needs more. Maybe user-agent? May 27, 2019 at 13:11
9

If the setUseWideViewPort(true), it loads the WebView with the attributes defined in the meta tag of the webpage. So it scales the webpage as defined in the html.

7

From "Web Page Layout" documentation of WebView,

Web Page Layout

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.