From 183d5d78325fb01c23f7a9bdba8ab1f7d59052a6 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 25 Feb 2020 22:02:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/read/page/delegate/SimulationPageDelegate.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt index 713748aed..b7a5b1666 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt @@ -126,7 +126,7 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi } override fun setTouchPoint(x: Float, y: Float, invalidate: Boolean) { - super.setTouchPoint(x, y, invalidate) + super.setTouchPoint(x, y, false) //触摸y中间位置吧y变成屏幕高度 if ((startY > viewHeight * 0.33 && startY < viewHeight * 0.66) || mDirection == Direction.PREV @@ -139,6 +139,7 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi ) { touchY = 1f } + pageView.invalidate() } override fun setDirection(direction: Direction) { @@ -234,7 +235,7 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi drawCurrentPageShadow(canvas) drawCurrentBackArea(canvas, prevBitmap) } - else -> Unit + else -> return } }