diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-11-23 11:47:50 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-12-01 14:43:32 -0800 |
commit | 9326461652c36c2ddd888d1452cf7f075a391868 (patch) | |
tree | 1ad864d2009abbed3c2749232352008f8cdf0e24 /src/com/android/launcher3/PagedView.java | |
parent | 0c2f0700a55080318a4c21457408abb8af26740d (diff) | |
download | android_packages_apps_Trebuchet-9326461652c36c2ddd888d1452cf7f075a391868.tar.gz android_packages_apps_Trebuchet-9326461652c36c2ddd888d1452cf7f075a391868.tar.bz2 android_packages_apps_Trebuchet-9326461652c36c2ddd888d1452cf7f075a391868.zip |
Adding margin to Drag layer instead of checking for right insets at every place
Bug: 25692432
Change-Id: I853f41a17c54b30b7772b9fd8556d9465de84752
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 9258360fa..c34ac3a07 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -202,9 +202,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc protected final Rect mInsets = new Rect(); protected final boolean mIsRtl; - // When set to true, full screen content and overscroll effect is shited inside by right inset. - protected boolean mIgnoreRightInset; - // Edge effect private final LauncherEdgeEffect mEdgeGlowLeft = new LauncherEdgeEffect(); private final LauncherEdgeEffect mEdgeGlowRight = new LauncherEdgeEffect(); @@ -822,8 +819,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc childWidthMode = MeasureSpec.EXACTLY; childHeightMode = MeasureSpec.EXACTLY; - childWidth = getViewportWidth() - mInsets.left - - (mIgnoreRightInset ? mInsets.right : 0); + childWidth = getViewportWidth() - mInsets.left - mInsets.right; childHeight = getViewportHeight(); } if (referenceChildWidth == 0) { @@ -1182,9 +1178,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc getEdgeVerticalPostion(sTmpIntPoint); - int width = mIgnoreRightInset ? (display.width() - mInsets.right) : display.width(); - canvas.translate(sTmpIntPoint[0] - display.top, -width); - mEdgeGlowRight.setSize(sTmpIntPoint[1] - sTmpIntPoint[0], width); + canvas.translate(sTmpIntPoint[0] - display.top, -display.width()); + mEdgeGlowRight.setSize(sTmpIntPoint[1] - sTmpIntPoint[0], display.width()); if (mEdgeGlowRight.draw(canvas)) { postInvalidateOnAnimation(); } |