pull/37/head
kunfei 5 years ago
parent d53bdbd581
commit c90e50c99c
  1. 6
      app/src/main/java/io/legado/app/ui/widget/page/delegate/SimulationPageDelegate.kt

@ -9,15 +9,13 @@ import io.legado.app.utils.screenshot
class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageView) { class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageView) {
private var pageCount = 0
init { init {
pageView.curlView ?: let { pageView.curlView ?: let {
pageView.curlView = CurlView(pageView.context) pageView.curlView = CurlView(pageView.context)
pageView.addView(pageView.curlView) pageView.addView(pageView.curlView)
pageView.curlView?.mPageProvider = PageProvider() pageView.curlView?.mPageProvider = PageProvider()
pageView.curlView?.setSizeChangedObserver(SizeChangedObserver()) pageView.curlView?.setSizeChangedObserver(SizeChangedObserver())
pageView.curlView?.currentIndex = 0 pageView.curlView?.currentIndex = 1
} }
} }
@ -43,7 +41,7 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi
private inner class PageProvider : CurlView.PageProvider { private inner class PageProvider : CurlView.PageProvider {
override val pageCount: Int override val pageCount: Int
get() = this@SimulationPageDelegate.pageCount get() = 3
override fun updatePage(page: CurlPage, width: Int, height: Int, index: Int) { override fun updatePage(page: CurlPage, width: Int, height: Int, index: Int) {
when (index) { when (index) {

Loading…
Cancel
Save