From d8c869d15be4687bc4b2efb229ccb760d88a7224 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 17 Jun 2021 17:30:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/read/page/ReadView.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt index cb5bacf0d..b6de252c8 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt @@ -159,15 +159,16 @@ class ReadView(context: Context, attrs: AttributeSet) : override fun onTouchEvent(event: MotionEvent): Boolean { callBack.screenOffTimerStart() if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - val insets = this.rootWindowInsets.getInsetsIgnoringVisibility(WindowInsets.Type.mandatorySystemGestures()) + val insets = + this.rootWindowInsets.getInsetsIgnoringVisibility(WindowInsets.Type.mandatorySystemGestures()) val height = activity?.windowManager?.currentWindowMetrics?.bounds?.height() if (height != null) { if (event.y > height.minus(insets.bottom)) { - return true; + return true } } } - + when (event.action) { MotionEvent.ACTION_DOWN -> { if (isTextSelected) {