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

Commit bc7b84e4 authored by Vu Thanh Cong's avatar Vu Thanh Cong Committed by android-build-merger
Browse files

Merge "Fix edge effect not showing up on first scroll" am: 894d8cf4

am: 391a7c38

Change-Id: Icda44b95c21c99dc1de794f83bc28995a001c55a
parents d12b7f79 391a7c38
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -4337,13 +4337,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                translateX = 0;
                translateX = 0;
                translateY = 0;
                translateY = 0;
            }
            }
            mEdgeGlowTop.setSize(width, height);
            mEdgeGlowBottom.setSize(width, height);
            if (!mEdgeGlowTop.isFinished()) {
            if (!mEdgeGlowTop.isFinished()) {
                final int restoreCount = canvas.save();
                final int restoreCount = canvas.save();
                canvas.clipRect(translateX, translateY,
                canvas.clipRect(translateX, translateY,
                         translateX + width ,translateY + mEdgeGlowTop.getMaxHeight());
                         translateX + width ,translateY + mEdgeGlowTop.getMaxHeight());
                final int edgeY = Math.min(0, scrollY + mFirstPositionDistanceGuess) + translateY;
                final int edgeY = Math.min(0, scrollY + mFirstPositionDistanceGuess) + translateY;
                canvas.translate(translateX, edgeY);
                canvas.translate(translateX, edgeY);
                mEdgeGlowTop.setSize(width, height);
                if (mEdgeGlowTop.draw(canvas)) {
                if (mEdgeGlowTop.draw(canvas)) {
                    invalidateTopGlow();
                    invalidateTopGlow();
                }
                }
@@ -4358,7 +4359,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                        - (clipToPadding ? mPaddingBottom : 0);
                        - (clipToPadding ? mPaddingBottom : 0);
                canvas.translate(edgeX, edgeY);
                canvas.translate(edgeX, edgeY);
                canvas.rotate(180, width, 0);
                canvas.rotate(180, width, 0);
                mEdgeGlowBottom.setSize(width, height);
                if (mEdgeGlowBottom.draw(canvas)) {
                if (mEdgeGlowBottom.draw(canvas)) {
                    invalidateBottomGlow();
                    invalidateBottomGlow();
                }
                }