diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-08-02 17:46:29 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-08-02 17:46:29 +0000 |
commit | 95de553bcb319610cca04c6106281d691fbb156d (patch) | |
tree | e98978800f1aef70a178bddb5477d674d565320b /src/com | |
parent | 051cc3a187a104aa045c3054557a71892ec84397 (diff) | |
parent | 5d80c28161ed9b9f664bf8d2df359ec0f6910c3d (diff) | |
download | android_packages_apps_Trebuchet-95de553bcb319610cca04c6106281d691fbb156d.tar.gz android_packages_apps_Trebuchet-95de553bcb319610cca04c6106281d691fbb156d.tar.bz2 android_packages_apps_Trebuchet-95de553bcb319610cca04c6106281d691fbb156d.zip |
Merge "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" into ub-launcher3-dorval-polish2
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsRecyclerView.java | 25 |
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 331900cf1..d4a7b9377 100644 --- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java +++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java @@ -205,8 +205,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); @@ -215,6 +213,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; } @@ -339,6 +344,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. */ |