Adding margin to Drag layer instead of checking for right insets at every place
Bug: 25692432
Change-Id: I853f41a17c54b30b7772b9fd8556d9465de84752
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 9258360..c34ac3a 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -202,9 +202,6 @@
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 @@
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 @@
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();
}