Loading api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -193450,6 +193450,17 @@ visibility="public" > </method> <method name="getUseSystemOverscrollBackground" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getUseWideViewPort" return="boolean" abstract="false" Loading Loading @@ -194029,6 +194040,19 @@ <parameter name="use" type="boolean"> </parameter> </method> <method name="setUseSystemOverscrollBackground" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="system" type="boolean"> </parameter> </method> <method name="setUseWideViewPort" return="void" abstract="false" core/java/android/webkit/WebSettings.java +18 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -469,6 +470,23 @@ public class WebSettings { return mLoadWithOverviewMode; } /** * 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. */ Loading core/java/android/webkit/WebView.java +7 −4 Original line number Diff line number Diff line Loading @@ -2305,9 +2305,11 @@ public class WebView extends AbsoluteLayout boolean clampedY) { mInOverScrollMode = false; int maxX = computeMaxScrollX(); if (Math.abs(mMinZoomScale - mMaxZoomScale) < 0.01f && maxX == 0) { // do not over scroll x if the page can't be zoomed and it just fits // the screen if (maxX == 0 && (Math.abs(mMinZoomScale - mMaxZoomScale) < 0.01f) || !getSettings().supportZoom() || !getSettings().getUseWideViewPort()) { // do not over scroll x if the page just fits the screen and it // can't zoom or the view doesn't use wide viewport scrollX = pinLocX(scrollX); } else if (scrollX < 0 || scrollX > maxX) { mInOverScrollMode = true; Loading Loading @@ -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( Loading Loading
api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -193450,6 +193450,17 @@ visibility="public" > </method> <method name="getUseSystemOverscrollBackground" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getUseWideViewPort" return="boolean" abstract="false" Loading Loading @@ -194029,6 +194040,19 @@ <parameter name="use" type="boolean"> </parameter> </method> <method name="setUseSystemOverscrollBackground" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="system" type="boolean"> </parameter> </method> <method name="setUseWideViewPort" return="void" abstract="false"
core/java/android/webkit/WebSettings.java +18 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -469,6 +470,23 @@ public class WebSettings { return mLoadWithOverviewMode; } /** * 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. */ Loading
core/java/android/webkit/WebView.java +7 −4 Original line number Diff line number Diff line Loading @@ -2305,9 +2305,11 @@ public class WebView extends AbsoluteLayout boolean clampedY) { mInOverScrollMode = false; int maxX = computeMaxScrollX(); if (Math.abs(mMinZoomScale - mMaxZoomScale) < 0.01f && maxX == 0) { // do not over scroll x if the page can't be zoomed and it just fits // the screen if (maxX == 0 && (Math.abs(mMinZoomScale - mMaxZoomScale) < 0.01f) || !getSettings().supportZoom() || !getSettings().getUseWideViewPort()) { // do not over scroll x if the page just fits the screen and it // can't zoom or the view doesn't use wide viewport scrollX = pinLocX(scrollX); } else if (scrollX < 0 || scrollX > maxX) { mInOverScrollMode = true; Loading Loading @@ -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( Loading