From 0d147d9b897c6a5bec867d7443df31138f51c7e5 Mon Sep 17 00:00:00 2001 From: Martin Kosiba Date: Thu, 19 Sep 2013 19:05:00 -0700 Subject: Update WebView documentation section about zoom. This makes it clear that pinch-zoom and wrap_content don't go well together. BUG: 10598456 Change-Id: I748b454197353fcbe5c2621719934a121745d4ce --- core/java/android/webkit/WebView.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'core/java/android/webkit/WebView.java') diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 20fb1a7..ba1f038 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -58,9 +58,6 @@ import java.util.Map; * It uses the WebKit rendering engine to display * web pages and includes methods to navigate forward and backward * through a history, zoom in and out, perform text searches and more.

- *

To enable the built-in zoom, set - * {@link #getSettings() WebSettings}.{@link WebSettings#setBuiltInZoomControls(boolean)} - * (introduced in API level {@link android.os.Build.VERSION_CODES#CUPCAKE}). *

Note that, in order for your Activity to access the Internet and load web pages * in a WebView, you must add the {@code INTERNET} permissions to your * Android Manifest file:

@@ -161,9 +158,18 @@ import java.util.Map; * } * }); * - * webview.loadUrl("http://slashdot.org/"); + * webview.loadUrl("http://developer.android.com/"); * * + *

Zoom

+ * + *

To enable the built-in zoom, set + * {@link #getSettings() WebSettings}.{@link WebSettings#setBuiltInZoomControls(boolean)} + * (introduced in API level {@link android.os.Build.VERSION_CODES#CUPCAKE}).

+ *

NOTE: Using zoom if either the height or width is set to + * {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} may lead to undefined behavior + * and should be avoided.

+ * *

Cookie and window management

* *

For obvious security reasons, your application has its own @@ -222,6 +228,7 @@ import java.util.Map; *

The {@code hdpi.css} stylesheet is only used for devices with a screen pixel ration of 1.5, * which is the high density pixel ratio.

* + * * *

HTML5 Video support

* -- cgit v1.1