summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebSettings.java
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-03-09 10:55:04 -0800
committerGrace Kloba <klobag@google.com>2010-03-09 13:14:04 -0800
commit2d17e1d212ed88fdeca4b27bf04c17c56bd5dee1 (patch)
treea5eb58b8ce407755fbce942390ee53737d29088f /core/java/android/webkit/WebSettings.java
parent1c6743c40fcafdc77ad22557bb7a4b761029d13f (diff)
Add an api to set WebView over scroll background.
If the WebView doesn't support zoom, or WebView does not use wide viewport and horizontal is just fit, don't do over scroll. Fix http://b/issue?id=2498403 Fix http://b/issue?id=2497901
Diffstat (limited to 'core/java/android/webkit/WebSettings.java')
-rw-r--r--core/java/android/webkit/WebSettings.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 89814196f710..fb15f788d781 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -192,6 +192,7 @@ public class WebSettings {
private boolean mBuiltInZoomControls = false;
private boolean mAllowFileAccess = true;
private boolean mLoadWithOverviewMode = false;
+ private boolean mUseSystemOverscrollBackground = false;
// private WebSettings, not accessible by the host activity
static private int mDoubleTapToastCount = 3;
@@ -470,6 +471,23 @@ public class WebSettings {
}
/**
+ * Set whether the WebView uses system background for over scroll
+ * background. If false, it will use the WebView's background. Default is
+ * false.
+ */
+ public void setUseSystemOverscrollBackground(boolean system) {
+ mUseSystemOverscrollBackground = system;
+ }
+
+ /**
+ * Returns true if this WebView uses system background instead of WebView
+ * background for over scroll background.
+ */
+ public boolean getUseSystemOverscrollBackground() {
+ return mUseSystemOverscrollBackground;
+ }
+
+ /**
* Store whether the WebView is saving form data.
*/
public void setSaveFormData(boolean save) {