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

Commit fc14e37a authored by George Mount's avatar George Mount
Browse files

Fix consumption multiplier

Bug: 184392385

The pull consumption should be related to the width, not the height.

Test: Ran ApiDemos and result is vastly improved
Change-Id: I19e1262c42b4b85920e5038a789e2e934569cac3
parent 7eb1c4c2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -762,11 +762,11 @@ public class HorizontalScrollView extends FrameLayout {
                    if (canOverscroll) {
                        int consumed = 0;
                        if (deltaX < 0 && mEdgeGlowRight.getDistance() != 0f) {
                            consumed = Math.round(getHeight()
                            consumed = Math.round(getWidth()
                                    * mEdgeGlowRight.onPullDistance((float) deltaX / getWidth(),
                                    displacement));
                        } else if (deltaX > 0 && mEdgeGlowLeft.getDistance() != 0f) {
                            consumed = Math.round(-getHeight()
                            consumed = Math.round(-getWidth()
                                    * mEdgeGlowLeft.onPullDistance((float) -deltaX / getWidth(),
                                    1 - displacement));
                        }