diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 7ec794f88..a04ab024f 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -632,7 +632,7 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo super.onDestroy() mHandler.removeCallbacks(keepScreenRunnable) textActionMenu?.dismiss() - page_view.pageDelegate?.onDestroy() + page_view.onDestroy() } override fun observeLiveBus() { 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 919de9c54..5a2eae133 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 @@ -70,6 +70,11 @@ class PageView(context: Context, attrs: AttributeSet) : return pageDelegate?.onTouch(event) ?: super.onTouchEvent(event) } + fun onDestroy() { + pageDelegate?.onDestroy() + curPage.cancelSelect() + } + fun fillPage(direction: PageDelegate.Direction) { when (direction) { PageDelegate.Direction.PREV -> {