Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44deaac9 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

[automerger] Updating fade-effect parameters: > Shifting the effect at the...

[automerger] 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 am: 5d80c281

Change-Id: I5f0083b29d79dbd60c1a5b41e42a1b59e6599a65
parents d6d0afd9 5d80c281
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -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.
     */