From ac18cdcad73cb8ae967502b87d0410d705dfc9f6 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 6 Oct 2019 17:22:38 +0800 Subject: [PATCH] up --- .../app/ui/widget/page/delegate/SimulationPageDelegate.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/page/delegate/SimulationPageDelegate.kt b/app/src/main/java/io/legado/app/ui/widget/page/delegate/SimulationPageDelegate.kt index 0c552bb75..d64bf4741 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/delegate/SimulationPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/delegate/SimulationPageDelegate.kt @@ -40,10 +40,14 @@ class SimulationPageDelegate(pageView: PageView) : PageDelegate(pageView) { private inner class PageProvider : CurlView.PageProvider { override val pageCount: Int - get() = 1 + get() = 3 override fun updatePage(page: CurlPage, width: Int, height: Int, index: Int) { - page.setTexture(curPage?.screenshot(), CurlPage.SIDE_BOTH) + when (index) { + 0 -> page.setTexture(prevPage?.screenshot(), CurlPage.SIDE_BOTH) + 1 -> page.setTexture(curPage?.screenshot(), CurlPage.SIDE_BOTH) + 2 -> page.setTexture(nextPage?.screenshot(), CurlPage.SIDE_BOTH) + } } }