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

Commit 95de553b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Updating fade-effect parameters: > Shifting the effect at the edge in...

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
parents 051cc3a1 5d80c281
Loading
Loading
Loading
Loading
+23 −2
Original line number Original line Diff line number Diff line
@@ -205,8 +205,6 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine


    @Override
    @Override
    public void onDraw(Canvas c) {
    public void onDraw(Canvas c) {
        c.translate(0, mContentTranslationY);

        // Draw the background
        // Draw the background
        if (mEmptySearchBackground != null && mEmptySearchBackground.getAlpha() > 0) {
        if (mEmptySearchBackground != null && mEmptySearchBackground.getAlpha() > 0) {
            mEmptySearchBackground.draw(c);
            mEmptySearchBackground.draw(c);
@@ -215,6 +213,13 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
        super.onDraw(c);
        super.onDraw(c);
    }
    }


    @Override
    protected void dispatchDraw(Canvas canvas) {
        canvas.translate(0, mContentTranslationY);
        super.dispatchDraw(canvas);
        canvas.translate(0, -mContentTranslationY);
    }

    public float getContentTranslationY() {
    public float getContentTranslationY() {
        return mContentTranslationY;
        return mContentTranslationY;
    }
    }
@@ -339,6 +344,22 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
        mFastScrollHelper.onSetAdapter((AllAppsGridAdapter) adapter);
        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.
     * Updates the bounds for the scrollbar.
     */
     */