From 128382ee786b7051a8ab0ea8f159f8efbc258a56 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 23 May 2022 19:20:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt | 3 +++ 1 file changed, 3 insertions(+) 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 c96eb6fed..8dd1d1f6b 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 @@ -121,6 +121,9 @@ class ReadView(context: Context, attrs: AttributeSet) : setRect9x() prevPage.x = -w.toFloat() pageDelegate?.setViewSize(w, h) + if (w > 0 && h > 0) { + upBg() + } } override fun dispatchDraw(canvas: Canvas) { From 084a68327bc577085cf41230be0d0593915939a0 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 23 May 2022 19:23:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt | 1 - 1 file changed, 1 deletion(-) 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 8dd1d1f6b..7733351fc 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 @@ -98,7 +98,6 @@ class ReadView(context: Context, attrs: AttributeSet) : addView(curPage) addView(prevPage) if (!isInEditMode) { - upBg() setWillNotDraw(false) upPageAnim() }