pull/32/head
kunfei 5 years ago
parent 42592f5d3f
commit 1fea378c61
  1. 4
      app/src/main/java/io/legado/app/ui/widget/page/PageView.kt
  2. 2
      app/src/main/java/io/legado/app/ui/widget/page/delegate/NoAnimPageDelegate.kt

@ -8,7 +8,7 @@ import android.view.MotionEvent
import android.widget.FrameLayout import android.widget.FrameLayout
import io.legado.app.help.ReadBookConfig import io.legado.app.help.ReadBookConfig
import io.legado.app.ui.widget.page.delegate.CoverPageDelegate import io.legado.app.ui.widget.page.delegate.CoverPageDelegate
import io.legado.app.ui.widget.page.delegate.NoAnmiPageDelegate import io.legado.app.ui.widget.page.delegate.NoAnimPageDelegate
import io.legado.app.ui.widget.page.delegate.PageDelegate import io.legado.app.ui.widget.page.delegate.PageDelegate
import io.legado.app.ui.widget.page.delegate.SlidePageDelegate import io.legado.app.ui.widget.page.delegate.SlidePageDelegate
import io.legado.app.utils.getPrefInt import io.legado.app.utils.getPrefInt
@ -139,7 +139,7 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att
fun upPageAnim() { fun upPageAnim() {
pageDelegate = when (context.getPrefInt("pageAnim")) { pageDelegate = when (context.getPrefInt("pageAnim")) {
1 -> SlidePageDelegate(this) 1 -> SlidePageDelegate(this)
2 -> NoAnmiPageDelegate(this) 2 -> NoAnimPageDelegate(this)
else -> CoverPageDelegate(this) else -> CoverPageDelegate(this)
} }
} }

@ -3,7 +3,7 @@ package io.legado.app.ui.widget.page.delegate
import android.graphics.Canvas import android.graphics.Canvas
import io.legado.app.ui.widget.page.PageView import io.legado.app.ui.widget.page.PageView
class NoAnmiPageDelegate(pageView: PageView) : PageDelegate(pageView) { class NoAnimPageDelegate(pageView: PageView) : PageDelegate(pageView) {
override fun onScrollStart() { override fun onScrollStart() {
startScroll(touchX.toInt(), 0, 0, 0) startScroll(touchX.toInt(), 0, 0, 0)
} }
Loading…
Cancel
Save