From 8cdd5b990bbe695e86558d721824a0aced1d37a4 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 23 May 2022 19:45:35 +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 --- app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt | 4 +++- 1 file changed, 3 insertions(+), 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 350436c5a..a114eace1 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() } @@ -121,6 +120,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) {