From 9c3f8a466cebf72af1fce6846518496a1b3eb60a Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 22 May 2022 22:27:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BF=BB=E9=A1=B5=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/read/page/PageView.kt | 2 +- .../ui/book/read/page/delegate/HorizontalPageDelegate.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt index 0e85d9c35..279249383 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt @@ -66,7 +66,7 @@ class PageView(context: Context) : FrameLayout(context) { fun getBitmap(): Bitmap? { synchronized(this) { - return bitmap + return bitmap?.copy(Bitmap.Config.ARGB_8888, false) } } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt index 0be97c422..b8713cbb9 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt @@ -20,15 +20,15 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie when (mDirection) { PageDirection.PREV -> { prevBitmap?.recycle() - prevBitmap = prevPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false) + prevBitmap = prevPage.getBitmap() curBitmap?.recycle() - curBitmap = curPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false) + curBitmap = curPage.getBitmap() } PageDirection.NEXT -> { nextBitmap?.recycle() - nextBitmap = nextPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false) + nextBitmap = nextPage.getBitmap() curBitmap?.recycle() - curBitmap = curPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false) + curBitmap = curPage.getBitmap() } else -> Unit }