diff options
author | Mangesh Ghiware <mghiware@google.com> | 2011-10-12 14:25:41 -0700 |
---|---|---|
committer | Mangesh Ghiware <mghiware@google.com> | 2011-10-12 15:24:29 -0700 |
commit | edb528ef52fd9b0148d559c5e596cf9bb9a6d2f9 (patch) | |
tree | 722df5f2e08b8192f55eb8769540281d04966510 /core/java/android/webkit/WebSettings.java | |
parent | c351ab473400ff15e53c33ab57cf8286c4bfad7a (diff) | |
download | frameworks_base-edb528ef52fd9b0148d559c5e596cf9bb9a6d2f9.zip frameworks_base-edb528ef52fd9b0148d559c5e596cf9bb9a6d2f9.tar.gz frameworks_base-edb528ef52fd9b0148d559c5e596cf9bb9a6d2f9.tar.bz2 |
Add setting for configuring zoom level on double-tap.
In overview mode, text wrap is done at reading level scale. If user
changes double-tap zoom in overview mode, reflow text at the new scale.
In any other mode, a double-tap will take user to overview mode, at
which point, the text will be reflowed at the updated reading level
scale.
Bug: 5312461
Change-Id: I29be34a32246019101a9a875e1758e22b5af2bd3
Diffstat (limited to 'core/java/android/webkit/WebSettings.java')
-rw-r--r-- | core/java/android/webkit/WebSettings.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 9c44138..f1c2bde 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -211,6 +211,7 @@ public class WebSettings { private ZoomDensity mDefaultZoom = ZoomDensity.MEDIUM; private RenderPriority mRenderPriority = RenderPriority.NORMAL; private int mOverrideCacheMode = LOAD_DEFAULT; + private int mDoubleTapZoom = 100; private boolean mSaveFormData = true; private boolean mAutoFillEnabled = false; private boolean mSavePassword = true; @@ -769,6 +770,27 @@ public class WebSettings { } /** + * Set the double-tap zoom of the page in percent. Default is 100. + * @param doubleTapZoom A percent value for increasing or decreasing the double-tap zoom. + * @hide + */ + public void setDoubleTapZoom(int doubleTapZoom) { + if (mDoubleTapZoom != doubleTapZoom) { + mDoubleTapZoom = doubleTapZoom; + mWebView.updateDoubleTapZoom(); + } + } + + /** + * Get the double-tap zoom of the page in percent. + * @return A percent value describing the double-tap zoom. + * @hide + */ + public int getDoubleTapZoom() { + return mDoubleTapZoom; + } + + /** * Set the default zoom density of the page. This should be called from UI * thread. * @param zoom A ZoomDensity value |