From 348f810df49c16fc4f7d242aff9ec3bf02f4829c Mon Sep 17 00:00:00 2001 From: seven332 Date: Sun, 2 Aug 2015 13:59:55 +0800 Subject: [PATCH] Fix EdgeView onPull --- .../main/java/com/hippo/ehviewer/gallery/ui/EdgeView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/hippo/ehviewer/gallery/ui/EdgeView.java b/app/src/main/java/com/hippo/ehviewer/gallery/ui/EdgeView.java index 285582018..742557356 100644 --- a/app/src/main/java/com/hippo/ehviewer/gallery/ui/EdgeView.java +++ b/app/src/main/java/com/hippo/ehviewer/gallery/ui/EdgeView.java @@ -109,15 +109,15 @@ public class EdgeView extends GLView { // offset is in pixels. direction is one of {TOP, LEFT, BOTTOM, RIGHT}. public void onPull(float offset, int direction) { int fullLength = ((direction & 1) == 0) ? getWidth() : getHeight(); - mEffect[direction].onPull((float)offset / fullLength); + mEffect[direction].onPull(offset / fullLength); if (!mEffect[direction].isFinished()) { invalidate(); } } public void onPull(float offset, float position, int direction) { - int fullLength = ((direction & 1) == 0) ? getWidth() : getHeight(); - int fullPosition = ((direction & 1) == 0) ? getHeight() : getWidth(); + int fullLength = ((direction & 1) == 0) ? getHeight() : getWidth(); + int fullPosition = ((direction & 1) == 0) ? getWidth() : getHeight(); mEffect[direction].onPull(offset / fullLength, position / fullPosition); if (!mEffect[direction].isFinished()) { invalidate();