Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do setUseWideViewPort() and setLoadWithOverviewMode() precisely do?

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.

like image 326
tacone Avatar asked Mar 27 '11 11:03

tacone


People also ask

How do I disable cache in WebView?

setAppCacheEnabled(false); webview. getSettings(). setCacheMode(WebSettings. LOAD_NO_CACHE);

Which method can be used to retrieve WebSettings?

Use WebSettings#setTextZoom(int) and WebSettings#getTextZoom() instead. Enum for specifying the WebView's desired density.

Which method can be used to retrieve web setting in Android?

Configuring WebView Settings with WebSettings getSettings() object if a WebView is already destroyed. You can retrieve WebSettings with WebView. getSettings() API.

What is wide viewport?

This allows a web page designed at 800 pixels wide to be completely visible on the screen when the viewport scale is 1.0. Most web browsers on Android (including Chrome) set the viewport to a large size by default (known as "wide viewport mode" at about 980px wide).


1 Answers

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)

like image 130
tacone Avatar answered Sep 29 '22 10:09

tacone