From b9adb1854f0d1c83b1e37683cd23f6f5930ece36 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 23 May 2022 09:33:02 +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/PageView.kt | 4 ++++ app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt | 3 --- .../app/ui/book/read/page/delegate/HorizontalPageDelegate.kt | 1 - 3 files changed, 4 insertions(+), 4 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 47983e69d..d2bd2b865 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 @@ -230,6 +230,8 @@ class PageView(context: Context) : FrameLayout(context) { val time = timeFormat.format(Date(System.currentTimeMillis())) tvTimeBattery?.setBattery(battery, time) tvTimeBatteryP?.text = "$time $battery%" + destroyDrawingCache() + buildDrawingCache() } fun setContent(textPage: TextPage, resetPageOffset: Boolean = true) { @@ -238,6 +240,8 @@ class PageView(context: Context) : FrameLayout(context) { resetPageOffset() } binding.contentTextView.setContent(textPage) + destroyDrawingCache() + buildDrawingCache() } fun setContentDescription(content: String) { 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 f3736d562..c96eb6fed 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 @@ -439,9 +439,6 @@ class ReadView(context: Context, attrs: AttributeSet) : fun upPageAnim() { isScroll = ReadBook.pageAnim() == 3 - prevPage.isDrawingCacheEnabled = !isScroll - curPage.isDrawingCacheEnabled = !isScroll - nextPage.isDrawingCacheEnabled = !isScroll ChapterProvider.upLayout() when (ReadBook.pageAnim()) { PageAnim.coverPageAnim -> if (pageDelegate !is CoverPageDelegate) { 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 b8713cbb9..737c238c6 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 @@ -49,7 +49,6 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie } private fun onScroll(event: MotionEvent) { - val action: Int = event.action val pointerUp = action and MotionEvent.ACTION_MASK == MotionEvent.ACTION_POINTER_UP