summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PagedView.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-10-07 20:45:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-07 20:45:51 +0000
commitb5772c8b4fdfb15579810040199da045acca11ea (patch)
tree85df38be9cb7d5fa9a7fee181115a5fb6551a770 /src/com/android/launcher3/PagedView.java
parent8617b9ed131f1fac7443d64c3cdc40a620eee8f7 (diff)
parent21d89fbf8c444c64a4c85d25a25bbe3b79719de9 (diff)
downloadandroid_packages_apps_Trebuchet-b5772c8b4fdfb15579810040199da045acca11ea.tar.gz
android_packages_apps_Trebuchet-b5772c8b4fdfb15579810040199da045acca11ea.tar.bz2
android_packages_apps_Trebuchet-b5772c8b4fdfb15579810040199da045acca11ea.zip
am 21d89fbf: Merge "Fixing overscroll effect when the navigation bar is opaque" into ub-launcher3-burnaby-polish
* commit '21d89fbf8c444c64a4c85d25a25bbe3b79719de9': Fixing overscroll effect when the navigation bar is opaque
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r--src/com/android/launcher3/PagedView.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index e4d644884..e90ec1476 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -187,6 +187,9 @@ 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();
@@ -798,7 +801,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
childWidthMode = MeasureSpec.EXACTLY;
childHeightMode = MeasureSpec.EXACTLY;
- childWidth = getViewportWidth() - mInsets.left - mInsets.right;
+ childWidth = getViewportWidth() - mInsets.left
+ - (mIgnoreRightInset ? mInsets.right : 0);
childHeight = getViewportHeight();
}
if (referenceChildWidth == 0) {
@@ -1152,8 +1156,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
canvas.rotate(90);
getEdgeVerticalPostion(sTmpIntPoint);
- canvas.translate(sTmpIntPoint[0] - display.top, -display.width());
- mEdgeGlowRight.setSize(sTmpIntPoint[1] - sTmpIntPoint[0], display.width());
+
+ int width = mIgnoreRightInset ? (display.width() - mInsets.right) : display.width();
+ canvas.translate(sTmpIntPoint[0] - display.top, -width);
+ mEdgeGlowRight.setSize(sTmpIntPoint[1] - sTmpIntPoint[0], width);
if (mEdgeGlowRight.draw(canvas)) {
postInvalidateOnAnimation();
}