From 2d17e1d212ed88fdeca4b27bf04c17c56bd5dee1 Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Tue, 9 Mar 2010 10:55:04 -0800 Subject: [PATCH] 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 --- api/current.xml | 24 +++++++++++++++++++++++ core/java/android/webkit/WebSettings.java | 18 +++++++++++++++++ core/java/android/webkit/WebView.java | 11 +++++++---- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/api/current.xml b/api/current.xml index 21c1c184c96c3..ed3f69659123d 100644 --- a/api/current.xml +++ b/api/current.xml @@ -193450,6 +193450,17 @@ visibility="public" > + + + + + + maxX) { mInOverScrollMode = true; @@ -3112,7 +3114,8 @@ public class WebView extends AbsoluteLayout } int saveCount = canvas.save(); - if (mInOverScrollMode) { + if (mInOverScrollMode + && getSettings().getUseSystemOverscrollBackground()) { if (mOverScrollBackground == null) { mOverScrollBackground = new Paint(); Bitmap bm = BitmapFactory.decodeResource(