summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-07-26 06:40:17 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-07-26 06:43:50 -0700
commit5d80c28161ed9b9f664bf8d2df359ec0f6910c3d (patch)
treee978bf7435049cd9d43deeb431dd3626c3dee986 /src
parentcab2e0e8a1ac529227a4b89646e44ba197087de2 (diff)
downloadandroid_packages_apps_Trebuchet-5d80c28161ed9b9f664bf8d2df359ec0f6910c3d.tar.gz
android_packages_apps_Trebuchet-5d80c28161ed9b9f664bf8d2df359ec0f6910c3d.tar.bz2
android_packages_apps_Trebuchet-5d80c28161ed9b9f664bf8d2df359ec0f6910c3d.zip
Updating fade-effect parameters:
> Shifting the effect at the edge in the presence of padding > Removing fade effect at the bottom > Fixing wrong call for translating children Bug: 63003761 Change-Id: Ia9d030de60e933a2e688496109d62977885c2c0d
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsRecyclerView.java25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index ab589d83b..22e295e76 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -202,8 +202,6 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
@Override
public void onDraw(Canvas c) {
- c.translate(0, mContentTranslationY);
-
// Draw the background
if (mEmptySearchBackground != null && mEmptySearchBackground.getAlpha() > 0) {
mEmptySearchBackground.draw(c);
@@ -212,6 +210,13 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
super.onDraw(c);
}
+ @Override
+ protected void dispatchDraw(Canvas canvas) {
+ canvas.translate(0, mContentTranslationY);
+ super.dispatchDraw(canvas);
+ canvas.translate(0, -mContentTranslationY);
+ }
+
public float getContentTranslationY() {
return mContentTranslationY;
}
@@ -336,6 +341,22 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
mFastScrollHelper.onSetAdapter((AllAppsGridAdapter) adapter);
}
+ @Override
+ protected float getBottomFadingEdgeStrength() {
+ // No bottom fading edge.
+ return 0;
+ }
+
+ @Override
+ protected boolean isPaddingOffsetRequired() {
+ return true;
+ }
+
+ @Override
+ protected int getTopPaddingOffset() {
+ return -getPaddingTop();
+ }
+
/**
* Updates the bounds for the scrollbar.
*/